Mercurial > dropbear
diff scp.c @ 546:568638be7203 agent-client
propagate from branch 'au.asn.ucc.matt.dropbear' (head 899a8851a5edf840b2f7925bcc26ffe99dcac54d)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 6bbab8364de17bd9ecb1dee5ffb796e48c0380d2)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 01 Jul 2009 04:16:32 +0000 |
parents | 910c2da71235 |
children | 281ed8384eb4 |
line wrap: on
line diff
--- a/scp.c Tue Sep 23 16:05:04 2008 +0000 +++ b/scp.c Wed Jul 01 04:16:32 2009 +0000 @@ -130,13 +130,22 @@ fprintf(stderr, " %s", a->list[i]); fprintf(stderr, "\n"); } - if ((pid = fork()) == -1) +#ifdef __uClinux__ + pid = vfork(); +#else + pid = fork(); +#endif /* __uClinux__ */ + if (pid == -1) fatal("do_local_cmd: fork: %s", strerror(errno)); if (pid == 0) { execvp(a->list[0], a->list); perror(a->list[0]); +#ifdef __uClinux__ + _exit(1); +#else exit(1); +#endif /* __uClinux__ */ } do_cmd_pid = pid; @@ -225,7 +234,11 @@ execvp(ssh_program, args.list); perror(ssh_program); +#ifndef __uClinux__ exit(1); +#else + _exit(1); +#endif /* __uClinux__ */ } else if (do_cmd_pid == -1) { fatal("fork: %s", strerror(errno)); }