Specifications

Include
<unistd.h>
Description
The getpid() function is provided for newlib compatibility and obtains the current process ID.
Return
Because HAL systems cannot contain multiple processes, getpid() always returns the same ID number.
Related Information
newlib Library Documentation
kill()
Prototype
int kill(int pid, int sig)
Commonly Called By
newlib C library
Thread-safe
Yes.
Available from ISR
Yes.
Include
<signal.h>
Description
The kill() function is used by newlib to send signals to processes. The input argument pid is the ID of
the process to signal, and sig is the signal to send. As there is only a single process in the HAL, the only
valid values for pid are either the current process ID, as returned by getpid(), or the broadcast values,
that is, pid must be less than or equal to zero.
The following signals result in an immediate shutdown of the system, without call to exit(): SIGABRT,
SIGALRM, SIGFPE, SIGILL, SIGKILL, SIGPIPE, SIGQUIT, SIGSEGV, SIGTERM, SIGUSR1, SIGUSR2, SIGBUS,
SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, SIGVTALRM, SIGXCPU, and SIGXFSZ.
The following signals are ignored: SIGCHLD and SIGURG.
All the remaining signals are treated as errors.
Return
The return value is zero on success, or –1 otherwise. If the call fails, errno is set to indicate the cause of
the error.
NII5V2
2015.05.14
kill()
14-59
HAL API Reference
Altera Corporation
Send Feedback