03-25-2005
If a process is sleeping inside a (kernel mode) system call, it will not respond to any signals/interrupts. That can happen sometimes, and the only way out that I know is a reboot.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Suppose we have the following process tree:
init-> ProcessA->processB->processC
then I kill processB
Who is the parent of the processC?
init or the processA (6 Replies)
Discussion started by: Puntino
6 Replies
2. Programming
We are forking a process B from process A and the process B should display the details it reads from process C(daemon process) continuously.
Let us say that the process C sents 100 packets.The process B receives all the 100 packets from the process C before it prints all details of 31... (1 Reply)
Discussion started by: cijkmysj
1 Replies
3. Solaris
hi,
i am creating a daemon process for updating the file at regular interval.one problem with this is if anybody kills the daemon it wont update the file.anybody have idea how to rerun the daemon if it killed.the code is written in c++ in solaries environment.
thnaks & regards
suresh (8 Replies)
Discussion started by: suresh_rtp
8 Replies
4. Shell Programming and Scripting
I have this shell script and in case the sybase process is been killed how can identify whether the process was killed or not, as the error code always returns 0.
#!/bin/sh
isql -S SERVER -U user -P pass<<TOP
select * from tableName
go
TOP
echo $? (2 Replies)
Discussion started by: dinjo_jo
2 Replies
5. Solaris
Hi all,
Currently I am using LDAP to store some network related data, When I run following script
./ns-slapd ldif2db
Execution of above script terminates displaying "Killed" on the console.
As far as I know, a process can be killed by two ways-
1. manually running " kill -9 <PID of LDAP... (1 Reply)
Discussion started by: akash_mahakode
1 Replies
6. UNIX for Dummies Questions & Answers
HI all,
I am very new to AIX (matter of fact Unix). We are currently automating out manual process using Unix Shell Scripting.
My wrote a shell script which will accept the name of the sas job as parameter, checks the existense of the sas file in the specified folder.
If it is not present,... (1 Reply)
Discussion started by: anubhav2020
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a process which takes 13-15 mins for execution and its getting killed in the meantime.So can you please helpme out how to protect the process from getting killed.
Thanks in advance.
Regards,
Harika (9 Replies)
Discussion started by: harikagrp
9 Replies
8. UNIX for Dummies Questions & Answers
Hi reader,
I'm making a tool out of korn shell script that is running on a HP-UX server. But everytime i invoke the tool, it gets killed after a while (mid-process). I have tried re-running it a couple of times but each invocation ending up the same way ..
following is a snippet of the o/p... (8 Replies)
Discussion started by: clakkad
8 Replies
9. Shell Programming and Scripting
Hi,all.Well,I know someone has already asked this question before,however,It's too long before.So i post a new thread here.
Here is the issue.I have a shell script that use awk to calculate something and the script takes about 15 mins,it will use 100% CPU,and the system automatically killed the... (2 Replies)
Discussion started by: homeboy
2 Replies
10. Shell Programming and Scripting
I have two set of questions.
1) To skip killing some process automatically.
2) To kill other process and capture their log.
I have set of process, some needs to be killed gracefully and others should be skipped.
Listed are the process.
adm 1522... (1 Reply)
Discussion started by: murali1687
1 Replies
LEARN ABOUT NETBSD
ltsleep
LTSLEEP(9) BSD Kernel Developer's Manual LTSLEEP(9)
NAME
ltsleep, tsleep, wakeup -- process context sleep and wakeup
SYNOPSIS
#include <sys/proc.h>
int
tsleep(wchan_t ident, pri_t priority, const char *wmesg, int timo);
void
wakeup(wchan_t ident);
DESCRIPTION
The interfaces described in this manual page are obsolete and will be removed from a future version of the system.
The ltsleep() interface has been obsoleted and removed from the system.
Please see the condvar(9), mutex(9), and rwlock(9) manual pages for information on kernel synchronisation primitives.
These functions implement voluntary context switching. tsleep() is used throughout the kernel whenever processing in the current context can
not continue for any of the following reasons:
o The current process needs to await the results of a pending I/O operation.
o The current process needs resources (e.g., memory) which are temporarily unavailable.
o The current process wants access to data-structures which are locked by other processes.
The function wakeup() is used to notify sleeping processes of possible changes to the condition that caused them to go to sleep. Typically,
an awakened process will -- after it has acquired a context again -- retry the action that blocked its operation to see if the ``blocking''
condition has cleared.
The tsleep() function takes the following arguments:
ident An identifier of the ``wait channel'' representing the resource for which the current process needs to wait. This typically is the
virtual address of some kernel data-structure related to the resource for which the process is contending. The same identifier
must be used in a call to wakeup() to get the process going again. ident should not be NULL.
priority The process priority to be used when the process is awakened and put on the queue of runnable processes. This mechanism is used to
optimize ``throughput'' of processes executing in kernel mode. If the flag PCATCH is OR'ed into priority the process checks for
posted signals before and after sleeping.
wmesg A pointer to a character string indicating the reason a process is sleeping. The kernel does not use the string, but makes it
available (through the process structure field p_wmesg) for user level utilities such as ps(1).
timo If non-zero, the process will sleep for at most timo/hz seconds. If this amount of time elapses and no wakeup(ident) has occurred,
and no signal (if PCATCH was set) was posted, tsleep() will return EWOULDBLOCK.
The wakeup() function will mark all processes which are currently sleeping on the identifier ident as runnable. Eventually, each of the pro-
cesses will resume execution in the kernel context, causing a return from tsleep(). Note that processes returning from sleep should always
re-evaluate the conditions that blocked them, since a call to wakeup() merely signals a possible change to the blocking conditions. For
example, when two or more processes are waiting for an exclusive-access lock (see lock(9)), only one of them will succeed in acquiring the
lock when it is released. All others will have to go back to sleep and wait for the next opportunity.
RETURN VALUES
tsleep() returns 0 if it returns as a result of a wakeup(). If a tsleep() returns as a result of a signal, the return value is ERESTART if
the signal has the SA_RESTART property (see sigaction(2)), and EINTR otherwise. If tsleep() returns because of a timeout it returns
EWOULDBLOCK.
SEE ALSO
sigaction(2), condvar(9), hz(9), lock(9), mutex(9), rwlock(9)
HISTORY
The sleep/wakeup process synchronization mechanism is very old. It appeared in a very early version of Unix. tsleep() appeared in 4.4BSD.
ltsleep() appeared in NetBSD 1.5.
BSD
January 28, 2012 BSD