mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 01:41:37 +03:00
vere: check for permission error on old process kill
This commit is contained in:
parent
a7de786d01
commit
2300d4fbcb
@ -617,7 +617,15 @@ u3_disk_acquire(c3_c* pax_c)
|
||||
else if (pid_w != getpid()) {
|
||||
c3_w i_w;
|
||||
|
||||
if ( -1 != kill(pid_w, SIGTERM) ) {
|
||||
int ret = kill(pid_w, SIGTERM);
|
||||
|
||||
if ( -1 == ret && errno == EPERM ) {
|
||||
u3l_log("disk: permission denied when trying to kill process %d!\n", pid_w);
|
||||
kill(getpid(), SIGTERM);
|
||||
sleep(1); c3_assert(0);
|
||||
}
|
||||
|
||||
if ( -1 != ret ) {
|
||||
u3l_log("disk: stopping process %d, live in %s...\n",
|
||||
pid_w, pax_c);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user