System calls in C and C++

Programs across programming languages can make system calls. System calls can be a significant security concern. For example, allowing unsanitized user input is an obvious hazard.

A modern method of making system calls in C and C++ across operating systems is exec, known on Windows as _exec.

An execlp example demonstrates casting intptr_t to int for the specific cases where a function is known to use intptr_t in this way.