-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On August 19, 2003 09:40 am, Andreas Schmidt wrote:
> Hello,
>
> same on sol8-intel. No ideas, sorry...
>
> Best regards, Andreas
>
> > Hi,
> > We are running VNC on our Solaris 8 box
> > (vnc-3.3.3r2-sol8-sparc-local).When we start vncserver from any terminal,
> > aftr starting vncserver, when we cancel any command using (CTRL C), it
> > kills vnc server also.
I just tried this with various shells on Solaris 8. It only happens when using
the Bourne shell (/bin/sh). csh, ksh (and a version of bash) are all fine,.
when run interactively. Using a non-interactive invocation of the shell ('ksh
- -c vncserver', for example) did not work.
Presumably, under the Bourne shell, Xvnc is left in the same process group as
the foreground process - and ^C sends the signal to the process group, not
just the foreground process.
Running as a background process in a shell script, as Steve Palocz suggests,
will work - unless vncserver wants input from the terminal (e.g. to set the
password the first time).
The following change to the vncserver perl script will fix it (note this may
not be the latest and greatest vncserver script, so you may have to tweak it
a bit):
*** /disk/ebi/disk2/grant/bin/vncserver.orig Fri Nov 1 10:53:29 2002
- --- /disk/ebi/disk2/grant/bin/vncserver Tue Aug 19 15:15:36 2003
***************
*** 161,167 ****
# Run $cmd and record the process ID.
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
! system("$cmd & echo \$! >$pidFile");
# Give Xvnc a chance to start up
- --- 161,174 ----
# Run $cmd and record the process ID.
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
! $pid = fork();
! if ($pid == 0) {
! setpgrp(0,0);
! system("$cmd & echo \$! >$pidFile");
! exit(0);
! }
!
! waitpid($pid,0);
# Give Xvnc a chance to start up
- --
Grant McDorman <[EMAIL PROTECTED]>, Sr. Software Design Consultant
Cedara Software Corp. <URL:http://www.cedara.com>
(formerly I.S.G. Technologies Inc.)
Mississauga, Ontario, Canada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (SunOS)
iD8DBQE/QnkLLVa+EmyjizARAo46AJ46ln81RP+slkMC2X5ZhVnGZvhI6gCfeZju
mWGSToTBXqWziCkvaW0WHFc=
=wVV9
-----END PGP SIGNATURE-----
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list