Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/system/lib/libc/kill.c
6162 views
1
/*
2
* Copyright 2021 The Emscripten Authors. All rights reserved.
3
* Emscripten is available under two separate licenses, the MIT license and the
4
* University of Illinois/NCSA Open Source License. Both these licenses can be
5
* found in the LICENSE file.
6
*/
7
8
#include <signal.h>
9
#include <stdio.h>
10
#include <unistd.h>
11
#include <errno.h>
12
13
int kill(pid_t pid, int sig) {
14
if (pid == getpid()) {
15
return raise(sig);
16
}
17
errno = EPERM;
18
return -1;
19
}
20
21