Sponsored Content
Full Discussion: UNIX Process Suspend
Top Forums UNIX for Dummies Questions & Answers UNIX Process Suspend Post 62186 by bhargav on Sunday 13th of February 2005 02:27:49 AM
Old 02-13-2005
You are right Phantom !

if you have more than one job suspended ... find out pid of jobs by

Code:
jobs -p

See the following example.

Code:
$sleep 500
^Z[1] + Stopped (bhargav)        sleep 500
$sleep 400
^Z[2] + Stopped (bhargav)        sleep 400
$jobs -p
42738
72260
$fg 42738
sleep 400
^C$
$jobs -p
72260
$fg 72260
sleep 500
^Z[1] + Stopped (bhargav)        sleep 500
$ps | grep 72260
 42742  pts/0  0:00 grep 72260
 72260  pts/0  0:00 sleep 500
$fg 72260
sleep 500
^C$jobs -p
$

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

suspend a process

Hello, Two child processes work at the same time because they communicate one another. In KSH, does it exist a good way to suspend a parent process until one of the two child processes stops. It seems that the command 'wait' works well for one process but for two processes, it suspends the... (7 Replies)
Discussion started by: piou78
7 Replies

2. UNIX for Advanced & Expert Users

Suspend to write file

We have a common directory , everyone can put file to it , but I found that there is a problem if the user continouosly write files to this directory while the another application is running at the same time , so I want temporaily "protect" the directory , no files can be write to it at a specific... (3 Replies)
Discussion started by: ust
3 Replies

3. Shell Programming and Scripting

suspend/restart a process in shell script

Hi, I have a task that Im stuck on. I have an elementary script named 'myscript' that prints "the script is running" once a second. It runs for 27 seconds. I need to write a 2nd script that starts 'myscript' and takes a parameter '$1' for a number. my 2nd script then needs to pause myscript... (1 Reply)
Discussion started by: daneensign
1 Replies

4. Solaris

Suspend in opensolaris

How does one enable the suspend to hard drive or ram and sleep features on a desktiop running Open Solaris? (2 Replies)
Discussion started by: FloridaBSD
2 Replies

5. Shell Programming and Scripting

How to suspend a user account?

Hi, guys. I have two questions: I need to write a script, which can show all the non-suspended users on system, and suspend the selected user account. There are two things I am not sure: 1. How can I suspend user's account? What I think is: add a string to the encrypted password in shadow... (2 Replies)
Discussion started by: daikeyang
2 Replies

6. Shell Programming and Scripting

Suspend of crontab temprorarily

Hello Friends, I would like to find out if there is a way to suspend crontab script? I need to suspend the scheduling of crontab scripts in case of an alarm and when alarm ends need to start them again automaticaly, could you suggest me a method? one of participiant of the forum with name... (6 Replies)
Discussion started by: EAGL€
6 Replies

7. Solaris

Solaris 10 Suspend System

One of our Solaris 10 Guru's created a Solaris 10 image and he disabled the Suspend System option. How do I enable it again? example right click on the desktop the go to the bottom Suspend System in grayed out. Any help would be great. ---------- Post updated at 09:02 PM ----------... (1 Reply)
Discussion started by: deaconf19
1 Replies

8. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

9. UNIX for Advanced & Expert Users

Hibernate and Suspend

I have a C++ program which ends up getting run on every conceivable distro. What I can't do in C++, I can do by shelling out to the O/S. I am trying to find a portable way to send the system into hibernate and suspend modes. For users who have pm-utils, of course, I can use that, but I am trying... (4 Replies)
Discussion started by: BrandonShw
4 Replies
_lwp_suspend(2) 						   System Calls 						   _lwp_suspend(2)

NAME
_lwp_suspend, _lwp_continue - continue or suspend LWP execution SYNOPSIS
#include <sys/lwp.h> int _lwp_suspend(lwpid_t target_lwp); int _lwp_continue(lwpid_t target_lwp); DESCRIPTION
The _lwp_suspend() function immediately suspends the execution of the LWP specified by target_lwp. On successful return from _lwp_sus- pend(), target_lwp is no longer executing. Once a thread is suspended, subsequent calls to _lwp_suspend() have no affect. The _lwp_continue() function resumes the execution of a suspended LWP. Once a suspended LWP is continued, subsequent calls to _lwp_con- tinue() have no effect. A suspended LWP will not be awakened by a signal. The signal stays pending until the execution of the LWP is resumed by _lwp_continue(). RETURN VALUES
Upon successful completion, 0 is returned. A non-zero value indicates an error. ERRORS
If the following condition occurs, _lwp_suspend() and _lwp_continue() fail and return the corresponding value: ESRCH The target_lwpid argument cannot be found in the current process. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.10 13 Aug 2001 _lwp_suspend(2)
All times are GMT -4. The time now is 10:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy