summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fad589f)
Gets the error handling out of the way so it can be forgotten.
master_in = open_master_pty("input");
master_out = open_master_pty("output");
master_in = open_master_pty("input");
master_out = open_master_pty("output");
+ if ((child = fork()) == -1) {
+ die("fork() failed: %s\n", strerror(errno));
+ }
/*
* Start the child process if we are in the child; open the two
/*
* Start the child process if we are in the child; open the two
execvp(argv[2], argv + 2);
die("execvp(%s) failed: %s\n", argv[2], strerror(errno));
execvp(argv[2], argv + 2);
die("execvp(%s) failed: %s\n", argv[2], strerror(errno));
-
- } else if (child < 0) {
- die("fork() failed: %s\n", strerror(errno));
}
if (!(output = fopen(argv[1], "w"))) {
}
if (!(output = fopen(argv[1], "w"))) {