Redirecting a process or detecting a process?

Redirecting a process or detecting a process?

Post by Rowan Crawfo » Sun, 27 Aug 1995 04:00:00



This question is really directed at Irix (5.3), but I guess it could
be similar on other Unix systems.

What I want to be able to do is tell the system to redirect certain
type(s) of processes at any time.

So for example, it detects that an 'ipaste' process has started up,
but instead of displaying the image on the current system, it redirects
it to another system, or perhaps even to /dev/null.

I've tried various ways to do it. Firstly just a simple script that
checked every 10 seconds (via sleep) my process list (ps -ef) to see
if the process had started. Two problems here - firstly I could only
intercept the rogue process AFTER it had started on my system, and
2ndly it slowed the machine down to an annoying level.

Then i tried the "period" option (set tperiod = {time} : alias periodic etc...)
but it didn't seem to work as I wanted either. It appeared to be releated
to just a certain shell and not the whole system.

Lastly I tried to set up a cron to do it. Again, this would only be
able to act /after/ the rogue process had started. But I think my real
problem with it might have been that it was using sh to run my script
whereas my script was tcsh.

---

I'll explain my situation and maybe that will help understand the problem.
At work we play a lot of Deathmatch Doom :). One of the guys made himself
a script which - at his command - sent a string of about 20 small images
to all the other system, and you MUST click down all 20 images before
you can get back to Doom. A neat trick, but annoying.

So I'm trying to find a good way to get him back. I'd like to be able
to get the images to be redirected back to him even before I see them.
But failing that i just want to be able to detect that they have happened
and run a script to deal with him (prolly by killing his Doom process -
not as nice, but it'll confuse him).

--

Well, I know a little Irix, but to do this goes beyond my knowledge limits.
Anyone willing to be an accomplace to the revenge is welcome to give
me some info :).

Cheers,
Row.

--
Animagrafx

 
 
 

Redirecting a process or detecting a process?

Post by m.. » Thu, 31 Aug 1995 04:00:00



>At work we play a lot of Deathmatch Doom :). One of the guys made himself
>a script which - at his command - sent a string of about 20 small images
>to all the other system, and you MUST click down all 20 images before
>you can get back to Doom. A neat trick, but annoying.

>So I'm trying to find a good way to get him back. I'd like to be able
>to get the images to be redirected back to him even before I see them.
>But failing that i just want to be able to detect that they have happened
>and run a script to deal with him (prolly by killing his Doom process -
>not as nice, but it'll confuse him).

So, that's why we don't have these nifty ASCII graphs anymore:
you're busy playing Doom! Seesh... :-)

What you want to do is not possible. The only thing you could
attempt is to protect your display against your friend's attempts.

How is Doom running on your system? What's the machine/OS? Is it
running in X-Windows? If so, look at the xhost command.

Also, why don't you just bang your friend on the head 'til he stops
cheating so lamely?
--

  Ingenieur logiciel - Developpement d'applications AIX
  Software engineer - AIX Application Development

 
 
 

1. detecting process death from unrelated process

Is there a way for process A to detect that process B has exited where
process A has the pid of process B but is not the parent of process B?

Thanks in advance,
Gerald Aden
--

Atlas Telecom                       VOICE: [USA] 1+503.228.1400 x659
4640 SW Macadam Ave.                FAX1:  [USA] 1+503.225.5518
Portland, OR 97201                  FAX2:  [USA] 1+503.228-0368
--

Atlas Telecom                       VOICE: [USA] 1+503.228.1400 x659
4640 SW Macadam Ave.                FAX1:  [USA] 1+503.225.5518
Portland, OR 97201                  FAX2:  [USA] 1+503.228-0368

2. IBM EtherJet 10/100 PCMCIA card

3. How to Kill Process and Its sub-process and its sub-process??

4. csh prompt

5. How to Kill a process and its sub-process and its sub-process at a time..

6. Any project or infor about install embedded Linux on Palm V machine?

7. redirecting a process output

8. Session Management

9. Help: redirecting process input/output

10. Redirecting stdout in a child process

11. Redirecting printjob to user process?

12. redirect output from child process into parent's stdout

13. How to redirect stdin/out for child process