Merge authors: James Hunt (jamesodhunt) Related merge proposals: https://code.launchpad.net/~jamesodhunt/upstart/test-upstart-name/+merge/195238 proposed by: James Hunt (jamesodhunt) ------------------------------------------------------------ revno: 1598 [merge] committer: Dimitri John Ledkov <[email protected]> branch nick: trunk timestamp: Wed 2014-03-05 12:38:57 +0000 message: Merge lp:~jamesodhunt/upstart/test-upstart-name modified: ChangeLog test/test_util_common.c
-- lp:upstart https://code.launchpad.net/~upstart-devel/upstart/trunk Your team Upstart Reviewers is subscribed to branch lp:upstart. To unsubscribe from this branch go to https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'ChangeLog' --- ChangeLog 2014-03-05 11:17:37 +0000 +++ ChangeLog 2014-03-05 12:38:57 +0000 @@ -128,6 +128,13 @@ 2013-11-14 James Hunt <[email protected]> + * test/test_util_common.c: _start_upstart(): Set name to + "test_init" for consistency with TEST_DBUS() and to make it + easier to avoid killing non-test Session Inits when developing + new tests. + +2013-11-14 James Hunt <[email protected]> + * NEWS: Release 1.11 2013-11-13 James Hunt <[email protected]> === modified file 'test/test_util_common.c' --- test/test_util_common.c 2013-11-12 12:17:30 +0000 +++ test/test_util_common.c 2013-11-14 15:19:31 +0000 @@ -489,8 +489,11 @@ TEST_NE (*pid = fork (), -1); if (! *pid) { - int fd; + char *argv0; + int fd; + nih_signal_reset (); + sigprocmask (SIG_SETMASK, &orig_set, NULL); if (! getenv ("UPSTART_TEST_VERBOSE")) { @@ -501,7 +504,14 @@ assert (dup2 (fd, STDERR_FILENO) != -1); } - assert (execv (argv[0], argv) != -1); + argv0 = argv[0]; + + /* Make the process stand out from existing non-test + * Session Init processes. + */ + argv[0] = "test_init"; + + assert (execvp (argv0, argv) != -1); } sigprocmask (SIG_SETMASK, &orig_set, NULL);
-- upstart-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/upstart-devel
