7

I'm on Ubuntu 22.04.3 LTS, (Jammy Jellyfish).

$ ps -p 1635
  PID TTY          TIME CMD
$ kill -0 1635 ; echo $?
0
$ type kill
kill is a shell builtin
$ echo $BASH_VERSION
5.1.16(1)-release
$ mount|grep proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

I'd expect kill -0 to return bash: kill: (1635) - No such process.

Update 1

ps -eLf | awk 'NR == 1 || /1635/'
 PID    PPID     LWP  C NLWP STIME TTY          TIME CMD
1632    1091    1635  0    9 13:07 ?        00:00:00 /usr/libexec/evolution-calendar-factory
12
  • 1
    Do you administer this system? Have you set hidepid when mounting procfs? Commented Oct 30, 2023 at 0:12
  • 1
    @AndrewHenle make that type kill - kill is probably going to be the built-in kill, but might be a function or alias, and which won't help with any of those cases. Commented Oct 30, 2023 at 7:22
  • 1
    I can't reproduce this in the ubuntu:22.04 Dockerhub Docker container. Commented Oct 30, 2023 at 8:53
  • 2
    Can you repeat and is the result the same each time? Your ps and your kill acted at different moments, a process with PID 1635 may have appeared in between. Commented Oct 30, 2023 at 9:47
  • 4
    1635 sounds like an oddly specific PID to test against. How did you pick that one? Guess: you have a thread with that PID, and ps doesn't show those by default. See what ps -eLf | awk 'NR == 1 || /1635/' shows you? (In case you're wondering, that AWK is pretty much the same as grep 1635, except it also prints the first record(line), i.e. the header.) Commented Oct 30, 2023 at 12:32

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.