mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 11:38:16 +00:00
Bug 452174 - Make updater binary parent-pid command line arg optional. r=bsmedberg
This commit is contained in:
parent
65ef12c84a
commit
f54c209e31
@ -1185,11 +1185,12 @@ int NS_main(int argc, NS_tchar **argv)
|
||||
// necessary for the parent process to exit before its executable image may
|
||||
// be altered.
|
||||
|
||||
if (argc < 3) {
|
||||
fprintf(stderr, "Usage: updater <dir-path> <parent-pid> [working-dir callback args...]\n");
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: updater <dir-path> [parent-pid [working-dir callback args...]]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argc > 2 ) {
|
||||
int pid = NS_tatoi(argv[2]);
|
||||
if (pid) {
|
||||
#ifdef XP_WIN
|
||||
@ -1211,6 +1212,7 @@ int NS_main(int argc, NS_tchar **argv)
|
||||
waitpid(pid, &status, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
// Launch a second instance of the updater with the runas verb on Windows
|
||||
|
Loading…
x
Reference in New Issue
Block a user