Changeset 4f3aa1c
- Timestamp:
- 02/23/2001 06:20:39 PM (24 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v3_0, v3_1, v3_2, v3_3, v4_0, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 0c7e9bd7
- Parents:
- b092e3d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/functions.xml
rb092e3d r4f3aa1c 37 37 evaluate_retval() 38 38 { 39 40 then 41 39 if [ $? = 0 ] 40 then 41 print_status success 42 42 else 43 43 print_status failure … … 97 97 # 98 98 # If no parameters are given to the print_status function, print usage 99 99 100 # information. 100 101 … … 218 219 219 220 # more PID's were found that belongs to the processes to be killed 221 220 222 # 221 223 if [ -n "$pid" ] … … 228 230 then 229 231 /bin/kill -TERM $pid 230 /usr/bin/sleep 2 231 # 232 # If after -TERM the PID still exists we'll try killing it with -KILL 233 # and wait for 2 seconds again to allow the kill to be completed 234 # 235 236 if ps h $pid >/dev/null 2>&1 232 # 233 # If after -TERM the PID still exists we'll wait 2 seconds before 234 # trying to kill it with -KILL. If the PID still exist after that, wait 235 # two more seconds. If the PIDs still exist by then it's safe to assume 236 # that we cannot kill these PIDs. 237 # 238 239 if /bin/ps h $pid >/dev/null 2>&1 237 240 then 238 /bin/kill -KILL $pid 239 /usr/bin/sleep 2 241 /usr/bin/sleep 2 242 if /bin/ps h $pid > /dev/null 2>&1 243 then 244 /bin/kill -KILL $pid 245 if /bin/ps h $pid > /dev/null 2>&1 246 then 247 /usr/bin/sleep 2 248 fi 249 fi 240 250 fi 241 /bin/ps h $pid >/dev/null 2>&1251 /bin/ps h $pid >/dev/null 2>&1 242 252 if [ $? = 0 ] 243 253 then … … 262 272 # 263 273 /bin/kill $killlevel $pid 264 /usr/bin/sleep 2 265 /bin/ps h $pid >/dev/null 2>&1 274 if /bin/ps h $pid > /dev/null 2>&1 275 then 276 /usr/bin/sleep 2 277 fi 278 /bin/ps h $pid >/dev/null 2>&1 266 279 if [ $? = 0 ] 267 280 then … … 294 307 # reload it's configuration file. This is almost identical to the 295 308 # killproc function with the exception that it won't try to kill it with 309 296 310 # a -KILL signal (aka -9) 297 311 # … … 365 379 # 366 380 # If nolevel was set we will use the default reload signal SIGHUP. 381 367 382 # 368 383
Note:
See TracChangeset
for help on using the changeset viewer.