Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: it enters infinite loop if the status returned -1 #91

Open
baronleonardo opened this issue Sep 17, 2024 · 0 comments
Open

Windows: it enters infinite loop if the status returned -1 #91

baronleonardo opened this issue Sep 17, 2024 · 0 comments

Comments

@baronleonardo
Copy link

baronleonardo commented Sep 17, 2024

    int status = subprocess_create(command_line, 
                                   subprocess_option_inherit_environment
                                   | subprocess_option_search_user_path
                                   | subprocess_option_enable_async
                                   | subprocess_option_combined_stdout_stderr,
                                   &out_process);

    subprocess_join(&out_process, &status);

    if (status)
    {
        char buf[BUFSIZ] = {0};
        while (subprocess_read_stdout(&out_process, buf, BUFSIZ))
        {
            printf("%s", buf);
        }
    }

    subprocess_destroy(&out_process);
  • This could will enter infinite loop on subprocess_read_stdout
  • the command used cl main.c, this happend if I'm not in a developer shell (i.e cl is not fount in PATH)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant