EVOLUTION-MANAGER
Edit File: pskill.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Kill a Process</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for pskill {tools}"><tr><td>pskill {tools}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Kill a Process</h2> <h3>Description</h3> <p><code>pskill</code> sends a signal to a process, usually to terminate it. </p> <h3>Usage</h3> <pre> pskill(pid, signal = SIGTERM) SIGHUP SIGINT SIGQUIT SIGKILL SIGTERM SIGSTOP SIGTSTP SIGCHLD SIGUSR1 SIGUSR2 </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>pid</code></td> <td> <p>positive integers: one or more process IDs as returned by <code><a href="../../base/html/Sys.getpid.html">Sys.getpid</a></code>.</p> </td></tr> <tr valign="top"><td><code>signal</code></td> <td> <p>integer, most often one of the symbolic constants.</p> </td></tr> </table> <h3>Details</h3> <p>Signals are a C99 concept, but only a small number are required to be supported (of those listed, only <code>SIGINT</code> and <code>SIGTERM</code>). They are much more widely used on POSIX operating systems (which should define all of those listed here), which also support a <code>kill</code> system call to send a signal to a process, most often to terminate it. Function <code>pskill</code> provides a wrapper: it silently ignores invalid values of its arguments, including zero or negative pids. </p> <p>In normal use on a Unix-alike, <kbd>Ctrl-C</kbd> sends <code>SIGINT</code>, <kbd>Ctrl-\</kbd> sends <code>SIGQUIT</code> and <kbd>Ctrl-Z</kbd> sends <code>SIGTSTP</code>: that and <code>SIGSTOP</code> suspend a process which can be resumed by <code>SIGCONT</code>. </p> <p>The signals are small integers, but the actual numeric values are not standardized (and most do differ between OSes). The <code>SIG*</code> objects contain the appropriate integer values for the current platform (or <code>NA_INTEGER_</code> if the signal is not defined). </p> <p>Only <code>SIGINT</code> and <code>SIGKILL</code> will be defined on Windows, and <code>pskill</code> will always use the Windows system call <code>TerminateProcess</code>. </p> <h3>Value</h3> <p>A logical vector of the same length as <code>pid</code>, <code>TRUE</code> (for success) or <code>FALSE</code>, invisibly. </p> <h3>See Also</h3> <p>Package <span class="pkg">parallel</span> has several means to launch child processes which record the process IDs. </p> <p><code><a href="psnice.html">psnice</a></code> </p> <h3>Examples</h3> <pre>## Not run: pskill(c(237, 245), SIGKILL) ## End(Not run)</pre> <hr /><div style="text-align: center;">[Package <em>tools</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>