summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-04-28 22:25:38 +0200
committerBram Moolenaar <Bram@vim.org>2019-04-28 22:25:38 +0200
commit67cf86bfff5fd5224d557d81cb146f46e33b831c (patch)
tree3ffaca7f4014f393ceb0216a2ec8fca091019c1c /src/os_unix.c
parentafde13b62b8fa25dac4635d5caee8d088b937ee0 (diff)
downloadvim-git-67cf86bfff5fd5224d557d81cb146f46e33b831c.tar.gz
patch 8.1.1231: asking about existing swap file unnecessarilyv8.1.1231
Problem: Asking about existing swap file unnecessarily. Solution: When it is safe, delete the swap file. Remove HAS_SWAP_EXISTS_ACTION, it is always defined. (closes #1237)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index b5255bba1..cd3b68ed7 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2393,6 +2393,16 @@ mch_get_pid(void)
return (long)getpid();
}
+/*
+ * return TRUE if process "pid" is still running
+ */
+ int
+mch_process_running(pid_t pid)
+{
+ // EMX kill() not working correctly, it seems
+ return kill(pid, 0) == 0;
+}
+
#if !defined(HAVE_STRERROR) && defined(USE_GETCWD)
static char *
strerror(int err)