home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!sun-barr!cs.utexas.edu!usc!news.bbn.com!daedalus.bbn.com!wsadkin
- From: wsadkin@bbn.com (Will Sadkin)
- Newsgroups: comp.unix.questions
- Subject: spawning dbx on ones' self
- Date: 2 Sep 1992 23:08:34 GMT
- Lines: 37
- Sender: wsadkin@daedalus.bbn.com (Will Sadkin)
- Distribution: world
- Message-ID: <laaibiINNkd6@news.bbn.com>
- NNTP-Posting-Host: daedalus.bbn.com
-
-
- To Unix wizards who read this group,
-
- I have an application where I need to have it start up a dbx on itself
- a certain point in it's execution. (For reasons I won't go into here, running
- dbx on the process from the start just won't do...) The basic scheme I came
- up with is to:
- get the pid for the process
- fork
- in child:
- run dbx on the pid of the parent
- in parent:
- stop
-
- Unfortunately, I cannot get this to work...
-
- If the parent sends itself a SIGSTOP, using kill, the dbx cannot
- attach, and just blocks forever.
-
- It seems that when dbx first attaches to a process it sends its own
- SIGSTOP. So I tried doing a sigpause(SIGSTOP), but this is not allowed.
-
- I tried calling just pause in the parent; this results in the dbx
- wedging, not accepting keyboard input; the same result happens if
- I simply call sleep. (What is happening here?)
-
- Am I violating any fundamental rules? If so, please let me know
- where I've gone wrong, and if not, does anyone out there have a
- solution to this problem?
-
- /Will
-
- -------------------------------------------------------------------------------
- Will Sadkin | "Never draw what you can copy;
- BBN Systems & Technologies | never copy what you can trace;
- wsadkin@bbn.com | never trace what you can cut out and paste down!"
- -------------------------------------------------------------------------------
-