Re: [Fink-devel] Re: setsid error message

2003-11-07 Thread Rob Braun
It appears that xdvi is trying to call setsid() after vfork().
Just about the only valid thing to do after vfork() is exec().
I'll bet this is your problem.  You may try examining xdvi's
usage of setsid() after the vfork().
However, it looks like the parent is simply exiting after the
vfork.  In that case, you can change the vfork to a fork, and all
will be well.

Rob

On Fri, Nov 07, 2003 at 10:53:07AM +0800, [EMAIL PROTECTED] wrote:
 Yes, I can read the setsid manpage, too, but it doesn't provide much 
 edification as to precisely why mktexpk fails with that message when
 run from xdvi, but when run from the command line with the same arguments
 seems to work perfectly. In fact, I'm not actually convinced that 
 mktexpk is being called at all.
 
 I have put a copy of the decoded ktrace on the web at
 
 http://www.rattus.net/~packrat/software/files/xdvi.trace.gz(360kb)
 
 with the trace all decendants flags on so that the location of the
 setsid stuff is visible. 
 
 The relevant parts are of the following form:
 
  11520 xdvi.xdvi GIO   fd 1 wrote 79 bytes
- mktexpk --mfmode ljfour --bdpi 600 --mag 'magstep(0)' --dpi 600 cmmi\
 10 '3'

  11520 xdvi.xdvi RET   write 79/0x4f
  11520 xdvi.xdvi CALL  vfork
  11521 xdvi.xdvi RET   vfork 11521/0x2d01
  11521 xdvi.xdvi CALL  close(0x6)
  11521 xdvi.xdvi RET   close 0
  11521 xdvi.xdvi CALL  dup2(0x7,0x3)
  11521 xdvi.xdvi RET   dup2 3
  11521 xdvi.xdvi CALL  close(0x7)
  11521 xdvi.xdvi RET   close 0
  11521 xdvi.xdvi CALL  setsid
  11521 xdvi.xdvi RET   setsid -1 errno 1 Operation not permitted
  11521 xdvi.xdvi CALL  writev(0x2,0xb350,0x4)
  11521 xdvi.xdvi GIO   fd 2 wrote 32 bytes
setsid: Operation not permitted

  11521 xdvi.xdvi RET   writev 32/0x20
  11521 xdvi.xdvi CALL  exit(0x1)
  11520 xdvi.xdvi RET   vfork 11521/0x2d01
  11520 xdvi.xdvi PSIG  SIGCHLD caught handler=0xa2e4 mask=0x0 code=0x0
 
 
 What precisely was the function of the setsid call in xdvi and why
 is xdvi being killed by a return code which is (from the point of view
 of setsid) hardly fatal?
 
 B
 -- 
 Packrat (BSc/BE;COSO;Wombat Implementor)
 Nihil illegitemi carborvndvm.
 
 
 
 ---
 This SF.net email is sponsored by: SF.net Giveback Program.
 Does SourceForge.net help you be more productive?  Does it
 help you create better code?   SHARE THE LOVE, and help us help
 YOU!  Click Here: http://sourceforge.net/donate/
 ___
 Fink-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/fink-devel


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Re: setsid error message

2003-11-07 Thread TheSin
I had the same problem with proftpd, but setsid was called after 
fork();  I put in a debug printout in between them and it worked...

On 7-Nov-03, at 12:29 AM, Rob Braun wrote:

It appears that xdvi is trying to call setsid() after vfork().
Just about the only valid thing to do after vfork() is exec().
I'll bet this is your problem.  You may try examining xdvi's
usage of setsid() after the vfork().
However, it looks like the parent is simply exiting after the
vfork.  In that case, you can change the vfork to a fork, and all
will be well.
Rob


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel


Re: [Fink-devel] Re: setsid error message

2003-11-07 Thread TheSin
just sent a fixed (working) version of xdvi to the maintainer...

On 7-Nov-03, at 8:03 AM, TheSin wrote:

I had the same problem with proftpd, but setsid was called after 
fork();  I put in a debug printout in between them and it worked...

On 7-Nov-03, at 12:29 AM, Rob Braun wrote:

It appears that xdvi is trying to call setsid() after vfork().
Just about the only valid thing to do after vfork() is exec().
I'll bet this is your problem.  You may try examining xdvi's
usage of setsid() after the vfork().
However, it looks like the parent is simply exiting after the
vfork.  In that case, you can change the vfork to a fork, and all
will be well.
Rob


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel


[Fink-devel] Re: setsid error message

2003-11-06 Thread pack-sf
Yes, I can read the setsid manpage, too, but it doesn't provide much 
edification as to precisely why mktexpk fails with that message when
run from xdvi, but when run from the command line with the same arguments
seems to work perfectly. In fact, I'm not actually convinced that 
mktexpk is being called at all.

I have put a copy of the decoded ktrace on the web at

http://www.rattus.net/~packrat/software/files/xdvi.trace.gz(360kb)

with the trace all decendants flags on so that the location of the
setsid stuff is visible. 

The relevant parts are of the following form:

 11520 xdvi.xdvi GIO   fd 1 wrote 79 bytes
   - mktexpk --mfmode ljfour --bdpi 600 --mag 'magstep(0)' --dpi 600 cmmi\
10 '3'
   
 11520 xdvi.xdvi RET   write 79/0x4f
 11520 xdvi.xdvi CALL  vfork
 11521 xdvi.xdvi RET   vfork 11521/0x2d01
 11521 xdvi.xdvi CALL  close(0x6)
 11521 xdvi.xdvi RET   close 0
 11521 xdvi.xdvi CALL  dup2(0x7,0x3)
 11521 xdvi.xdvi RET   dup2 3
 11521 xdvi.xdvi CALL  close(0x7)
 11521 xdvi.xdvi RET   close 0
 11521 xdvi.xdvi CALL  setsid
 11521 xdvi.xdvi RET   setsid -1 errno 1 Operation not permitted
 11521 xdvi.xdvi CALL  writev(0x2,0xb350,0x4)
 11521 xdvi.xdvi GIO   fd 2 wrote 32 bytes
   setsid: Operation not permitted
   
 11521 xdvi.xdvi RET   writev 32/0x20
 11521 xdvi.xdvi CALL  exit(0x1)
 11520 xdvi.xdvi RET   vfork 11521/0x2d01
 11520 xdvi.xdvi PSIG  SIGCHLD caught handler=0xa2e4 mask=0x0 code=0x0


What precisely was the function of the setsid call in xdvi and why
is xdvi being killed by a return code which is (from the point of view
of setsid) hardly fatal?

B
-- 
Packrat (BSc/BE;COSO;Wombat Implementor)
Nihil illegitemi carborvndvm.



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel