[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Putting an arbitrary process to sleep
- Subject: [ale] Putting an arbitrary process to sleep
- From: joe at madewell.com (Joe Steele)
- Date: Thu, 4 Jan 2001 11:36:09 -0500
What about sending the process stop
and cont signals to stop & start it?
Something like:
#!/bin/bash
#usage: psleep <PID> <SECS>
kill -STOP $1
sleep $2
kill -CONT $1
-Joe
-----Original Message-----
From: Joseph A. Knapka [SMTP:jknapka at earthlink.net]
Sent: Thursday, January 04, 2001 1:30 AM
To: ale at ale.org
Subject: [ale] Putting an arbitrary process to sleep
Does anyone know of a command or system call that
one can issue to make an arbitrary process sleep
for a given amount of time? "[u]sleep" puts the current
process to sleep, but that's not what I need.
Rationale: I want to write a daemon that will monitor
CPU temp and put certain processes (Seti at home, etc)
to sleep for a while if it gets too high. Maybe
there's already something like this around? Or maybe
there's an easier way to accomplish the task that
someone can suggest?
Thanks,
-- Joe Knapka
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.