Don't forget to flush

This commit is contained in:
Michael Spang 2009-01-31 01:10:02 -05:00
parent 3476038435
commit 54658af34a
2 changed files with 7 additions and 3 deletions

View File

@ -133,10 +133,14 @@ void warnpe(const char *msg, ...) {
va_end(args);
}
int spawnv(const char *path, char *argv[]) {
int spawnv(const char *path, char *const argv[]) {
int pid, status;
fflush(stdout);
fflush(stderr);
pid = fork();
if (pid == -1)
if (pid < 0)
fatalpe("fork");
else if (pid)
waitpid(pid, &status, 0);

View File

@ -15,7 +15,7 @@
#define LOG_AUTHPRIV LOG_AUTH
#endif
int spawnv(const char *, char *[]);
int spawnv(const char *path, char *const *argv);
void init_log(const char *ident, int option, int facility);
NORETURN void fatal(const char *, ...);