Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zos: don't error when killing a zombie process #3625

Merged
merged 1 commit into from May 25, 2022

Conversation

zsw007
Copy link
Contributor

@zsw007 zsw007 commented May 13, 2022

On z/OS, EPERM is returned if the process being killed is a zombie. However, this shouldn't be treated as an error in uv_kill() since it's already terminated, so return 0 instead.

@zsw007 zsw007 changed the title zos: don't err when killing a zombie process zos: don't error when killing a zombie process May 13, 2022
@vtjnash
Copy link
Member

vtjnash commented May 15, 2022

This seems consistent with the errata section of the relevant standard noting that some known implementations are not entirely standards compliant in this manner https://pubs.opengroup.org/onlinepubs/9699919799/functions/kill.html despite claiming standards compliance at https://www.ibm.com/docs/en/zos/2.1.0?topic=functions-kill-send-signal-process

src/unix/process.c Outdated Show resolved Hide resolved
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still SGTM

src/unix/process.c Outdated Show resolved Hide resolved
On z/OS, EPERM is returned if the process being killed is a zombie.
However, this shouldn't be treated as an error, so return 0 instead.

Co-Authored-By: Muntasir Mallick <mmallick@ca.ibm.com>
Co-Authored-By: Gaby Baghdadi <baghdadi@ca.ibm.com>
@vtjnash
Copy link
Member

vtjnash commented May 24, 2022

@vtjnash vtjnash merged commit 51dcac5 into libuv:v1.x May 25, 2022
@richardlau richardlau added the zos label Jun 16, 2022
lpinca added a commit to lpinca/node that referenced this pull request Jul 12, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Jul 23, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Sep 28, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Sep 29, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Oct 25, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Oct 26, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Oct 28, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Nov 2, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to lpinca/node that referenced this pull request Nov 5, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
lpinca added a commit to nodejs/node that referenced this pull request Nov 5, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
lucshi pushed a commit to lucshi/node that referenced this pull request Nov 9, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: nodejs#42290
PR-URL: nodejs#42340
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
RafaelGSS pushed a commit to nodejs/node that referenced this pull request Nov 10, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Dec 30, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Dec 30, 2022
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit to nodejs/node that referenced this pull request Jan 3, 2023
Notable changes:

- Build regression fixes for various platform updates
  (libuv/libuv#3428,
  libuv/libuv#3419,
  libuv/libuv#3423,
  libuv/libuv#3413,
  libuv/libuv#3431)
- Support for GNU/Hurd (libuv/libuv#3450)
- Release tool improvements
  (libuv/libuv-release-tool#13)
- Better performing rw locks on Win32 (libuv/libuv#3383)
- Support for posix_spawn API (libuv/libuv#3257)
- Fix regression on OpenBSD (libuv/libuv#3506)
- Add uv_available_parallelism() (libuv/libuv#3499)
- Don't use thread-unsafe strtok() (libuv/libuv#3524)
- Fix hang after NOTE_EXIT (libuv/libuv#3521)
- Better align order-of-events behavior between platforms
  (libuv/libuv#3598)
- Fix fs event not fired if the watched file is moved/removed/recreated
  (libuv/libuv#3540)
- Fix pipe resource leak if closed during connect (and other bugs)
  (libuv/libuv#3611)
- Don't error when killing a zombie process
  (libuv/libuv#3625)
- Avoid posix_spawnp() cwd bug (libuv/libuv#3597)
- Skip EVFILT_PROC events when invalidating events for an fd
  (libuv/libuv#3629)

Fixes: #42290
PR-URL: #42340
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants