Skip to content

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

@baronleonardo

Description

@baronleonardo
    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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions