scummvm random work
[patches.git] / dropbear-uclinux.patch
CommitLineData
5e993f12 1#
2# old_revision [2f31bc0e5d1c701ad8c03176bbb5722852c0c11d]
3#
4# patch "scp.c"
5# from [a490c2773b48cbdb1ec1fa12f312bb8d98092f12]
6# to [c9ced325688624015d7202aa1ef4bb2cf95cbfd9]
7#
8============================================================
9--- scp.c a490c2773b48cbdb1ec1fa12f312bb8d98092f12
10+++ scp.c c9ced325688624015d7202aa1ef4bb2cf95cbfd9
11@@ -130,13 +130,22 @@ do_local_cmd(arglist *a)
12 fprintf(stderr, " %s", a->list[i]);
13 fprintf(stderr, "\n");
14 }
15- if ((pid = fork()) == -1)
16+#ifdef __uClinux__
17+ pid = vfork();
18+#else
19+ pid = fork();
20+#endif /* __uClinux__ */
21+ if (pid == -1)
22 fatal("do_local_cmd: fork: %s", strerror(errno));
23
24 if (pid == 0) {
25 execvp(a->list[0], a->list);
26 perror(a->list[0]);
27+#ifdef __uClinux__
28+ _exit(1);
29+#else
30 exit(1);
31+#endif /* __uClinux__ */
32 }
33
34 do_cmd_pid = pid;
35@@ -225,7 +234,11 @@ do_cmd(char *host, char *remuser, char *
36
37 execvp(ssh_program, args.list);
38 perror(ssh_program);
39+#ifdef __uClinux__
40+ _exit(1);
41+#else
42 exit(1);
43+#endif /* __uClinux__ */
44 } else if (do_cmd_pid == -1) {
45 fatal("fork: %s", strerror(errno));
46 }