3.6.3. kill. Comtrol DeviceMaster Software Development Kit
Реклама
Реклама
Chapter 3. Using Cygwin cygpath [-W|-windir|-S|-sysdir]
-u|-unix print UNIX form of filename
-w|-windows print Windows form of filename
-p|-path filename argument is a path
-v|-version print program version
-W|-windir print windows directory
-S|-sysdir print system directory
The cygpath program is a utility that converts Windows native filenames to Cygwin
POSIX-style pathnames and back. It can be used when a Cygwin program needs to pass a file name to a native Windows program, or expects to get a file name from a native Windows program. You may use the long or short option names interchangeably, even though only the short ones are described here.
The -u and -w options indicate whether you want a conversion from Windows to
UNIX (POSIX) format ( -u ) or a conversion from UNIX (POSIX) to Windows format
(
-w
). You must give exactly one of these. To give neither or both is an error.
The -p option means that you want to convert a path-style string rather than a single filename. For example, the PATH environment variable is semicolon-delimited in
Windows, but colon-delimited in UNIX. By giving -p you are instructing cygpath to convert between these formats.
Example 3-5. Example cygpath usage
#!/bin/sh for i in ‘echo *.exe | sed ’s/\.exe/cc/’‘ do notepad ‘cygpath -w $i‘ done
3.6.3. kill
Usage: kill [-sigN] pid1 [pid2 ...]
50
Chapter 3. Using Cygwin
The kill program allows you to send arbitrary signals to other Cygwin programs. The usual purpose is to end a running program from some other window when ^C won’t work, but you can also send program-specified signals such as SIGUSR1 to trigger actions within the program, like enabling debugging or re-opening log files. Each program defines the signals they understand.
Note that the "pid" values are the Cygwin pids, not the Windows pids. To get a list of running programs and their Cygwin pids, use the Cygwin ps program.
To send a specific signal, use the -signN option, either with a signal number or a signal name (minus the "SIG" part), like these examples:
Example 3-6. Specifying signals with the kill command
$
$
$ kill 123 kill -1 123 kill -HUP 123
Here is a list of available signals, their numbers, and some commentary on them, from the file <sys/signal.h> , which should be considered the official source of this information.
SIGHUP
SIGINT
SIGQUIT
SIGILL
SIGTRAP
SIGABRT
SIGEMT
SIGFPE
SIGKILL
SIGBUS
SIGSEGV
SIGSYS
SIGPIPE
SIGALRM
SIGTERM
1
2
3
4
9
10
11
12
5
6
7
8
13
14
15 hangup interrupt quit illegal instruction (not reset when caught) trace trap (not reset when caught) used by abort
EMT instruction floating point exception kill (cannot be caught or ignored) bus error segmentation violation bad argument to system call write on a pipe with no one to read it alarm clock software termination signal from kill
51
Завантажити
Реклама