How to set an environment variable and start a process in ANSI C for Windows? If possible I want to avoid using any Windows API for this.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming portability is your reason for specifying ANSI C, you can do exactly what you want with the POSIX function
_execve:This is a portable function that spawns a new child process and allows you to supply an array of environment settings.