summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-10-08 14:36:51 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-10-08 14:36:51 +0000
commit8a67a66a613b85ab3c323594652da71b92915881 (patch)
tree78c316d15fe0cd3a6b9c0601897dfbfd9604420b /Src/exec.c
parentcc7274077564befa7426909e7c70f6de0169fa5e (diff)
downloadzsh-8a67a66a613b85ab3c323594652da71b92915881.tar.gz
zsh-8a67a66a613b85ab3c323594652da71b92915881.zip
20467: Reintroduce rusage-based escapes for TIMEFMT.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 47d20bb93..437233bad 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1162,18 +1162,14 @@ execpline(Estate state, wordcode slcode, int how, int last1)
(jobtab[list_pipe_job].stat & STAT_STOPPED)))) {
pid_t pid;
int synch[2];
- struct timezone dummy_tz;
struct timeval bgtime;
pipe(synch);
- gettimeofday(&bgtime, &dummy_tz);
- /* Any reason this isn't zfork? */
- if ((pid = fork()) == -1) {
+ if ((pid = zfork(&bgtime)) == -1) {
trashzle();
close(synch[0]);
close(synch[1]);
- putc('\n', stderr);
fprintf(stderr, "zsh: job can't be suspended\n");
fflush(stderr);
makerunning(jn);
@@ -1300,15 +1296,11 @@ execpline2(Estate state, wordcode pcode,
if (wc_code(code) >= WC_CURSH && (how & Z_SYNC)) {
int synch[2];
struct timeval bgtime;
- struct timezone dummy_tz;
pipe(synch);
- gettimeofday(&bgtime, &dummy_tz);
- /* any reason this isn't zfork? */
- if ((pid = fork()) == -1) {
+ if ((pid = zfork(&bgtime)) == -1) {
close(synch[0]);
close(synch[1]);
- zerr("fork failed: %e", NULL, errno);
} else if (pid) {
char dummy, *text;