aboutsummaryrefslogtreecommitdiff
path: root/debianutils
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 13:08:20 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-14 13:08:20 +1000
commit6a6efd31038d7afe977e3059508ae863e65cbdf5 (patch)
tree5cd69a751e893b83176751c80fcea7a7afeed1ae /debianutils
parenta6a2325ecf402054132daae169f71edb0fb849e3 (diff)
parent29082231d0cb1a5b327de5d515b16f332d4dbdaf (diff)
downloadbusybox-w32-6a6efd31038d7afe977e3059508ae863e65cbdf5.tar.gz
busybox-w32-6a6efd31038d7afe977e3059508ae863e65cbdf5.tar.bz2
busybox-w32-6a6efd31038d7afe977e3059508ae863e65cbdf5.zip
Merge branch 'origin/master' (early part)
Diffstat (limited to 'debianutils')
-rw-r--r--debianutils/mktemp.c3
-rw-r--r--debianutils/start_stop_daemon.c6
2 files changed, 4 insertions, 5 deletions
diff --git a/debianutils/mktemp.c b/debianutils/mktemp.c
index c40211476..2c4e19670 100644
--- a/debianutils/mktemp.c
+++ b/debianutils/mktemp.c
@@ -50,7 +50,8 @@ int mktemp_main(int argc UNUSED_PARAM, char **argv)
50 opts = getopt32(argv, "dqtp:", &path); 50 opts = getopt32(argv, "dqtp:", &path);
51 51
52 chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX"); 52 chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX");
53 chp = concat_path_file(path, chp); 53 if (chp[0] != '/' || (opts & 8))
54 chp = concat_path_file(path, chp);
54 55
55 if (opts & 1) { /* -d */ 56 if (opts & 1) { /* -d */
56 if (mkdtemp(chp) == NULL) 57 if (mkdtemp(chp) == NULL)
diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c
index 0a0802575..665f38fbd 100644
--- a/debianutils/start_stop_daemon.c
+++ b/debianutils/start_stop_daemon.c
@@ -409,9 +409,7 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
409 /* DAEMON_DEVNULL_STDIO is superfluous - 409 /* DAEMON_DEVNULL_STDIO is superfluous -
410 * it's always done by bb_daemonize() */ 410 * it's always done by bb_daemonize() */
411#else 411#else
412 pid_t pid = vfork(); 412 pid_t pid = xvfork();
413 if (pid < 0) /* error */
414 bb_perror_msg_and_die("vfork");
415 if (pid != 0) { 413 if (pid != 0) {
416 /* parent */ 414 /* parent */
417 /* why _exit? the child may have changed the stack, 415 /* why _exit? the child may have changed the stack,
@@ -448,5 +446,5 @@ int start_stop_daemon_main(int argc UNUSED_PARAM, char **argv)
448 } 446 }
449#endif 447#endif
450 execvp(startas, argv); 448 execvp(startas, argv);
451 bb_perror_msg_and_die("can't start %s", startas); 449 bb_perror_msg_and_die("can't execute '%s'", startas);
452} 450}