diff options
author | Craig A. Berry <craigberry@mac.com> | 2015-02-17 21:27:42 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2015-02-17 21:27:42 -0600 |
commit | 7d78c51a505cbafa404de787e640a4ad76839a16 (patch) | |
tree | e0e1077bb112284d0fbb18a0891935c3d40e8127 /vms/vms.c | |
parent | e92b41c6ac6bcd8786b0448c8337c4151e4f9a63 (diff) | |
download | perl-7d78c51a505cbafa404de787e640a4ad76839a16.tar.gz |
Make nowait spawn return correct pid on VMS.
Apparently I missed this back in eed5d6a149b02. When spawning a
subprocess without waiting, the return value is the pid of that
process, but we need to let pp_system know we're doing that so it
doesn't manipulate the value as if it were an exit status.
One symptom was that t/test.pl's watchdog would sometimes report
that it had failed to start when in fact it had started just fine.
Diffstat (limited to 'vms/vms.c')
-rw-r--r-- | vms/vms.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -10954,7 +10954,11 @@ do_spawn2(pTHX_ const char *cmd, int flags) fp = safe_popen(aTHX_ cmd, mode, (int *)&sts); if (fp != NULL) my_pclose(fp); - /* sts will be the pid in the nowait case */ + /* sts will be the pid in the nowait case, so leave a + * hint saying not to do any bit shifting to it. + */ + if (flags & CLI$M_NOWAIT) + PL_statusvalue = -1; } return sts; } /* end of do_spawn2() */ |