search for: stderr_to_file

Displaying 3 results from an estimated 3 matches for "stderr_to_file".

2014 Jan 27
1
Re: [PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
On Monday 27 January 2014 13:29:54 Richard W.M. Jones wrote: > +/* Execute a command, sending output to a file. */ > +static int > +exec_command (char **argv, const char *file, int stderr_to_file) > +{ > + pid_t pid; > + int status, fd; > + FILE *fp; > + char line[256]; > + > + pid = fork (); > + if (pid == -1) { > + perror ("fork"); > + return -1; > + } > + if (pid > 0) { > + if (waitpid (pid, &status, 0) == -1) { &gt...
2014 Jan 27
2
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
I thought it would be easy to rewrite virt-make-fs in C. Two days later ... The Perl program uses a lot of external commands, which makes it pretty tedious to implement in C. Rich.
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...eatures) == 0) { + fprintf (stderr, _("%s: NTFS support was disabled when libguestfs was compiled\n"), + program_name); + return -1; + } + + return 0; +} + +/* Execute a command, sending output to a file. */ +static int +exec_command (char **argv, const char *file, int stderr_to_file) +{ + pid_t pid; + int status, fd; + FILE *fp; + char line[256]; + + pid = fork (); + if (pid == -1) { + perror ("fork"); + return -1; + } + if (pid > 0) { + if (waitpid (pid, &status, 0) == -1) { + perror ("waitpid"); + return -1; + } + i...