Subject: Re: FvwmButtons do not respect Pixmap sometimes

From: Dominik Vogt <[email-masked]>
Date: Sat, 12 Jan 2002 14:52:58 +0100

[snip]

> Then I thin a comment should be paleced in FvwmButtons man page near
>        *FvwmButtons: Pixmap pixmapfile
>               Specifies  a  background  pixmap  to  use.  Specify
>               "none" for a transparent background.
> 
> Dominik> 
> >> Can you tell me what is this purpose?
> Dominik> 
> Dominik> I think the idea was to have a labeled button with a pixmap above
> Dominik> it that indicates the action that the button triggers.  You are
> 
> Hmm.. This is done with "Icon", not with all buttons wide "Pixmap", or
> I understand something incorrectly?

Oh, I see, I didn't realise you meant the background pixmap of the
whole button bar.  Yes, I see that too.  Consider it fixed :-)

[snip]

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 12 Jan 2002 15:42:18 +0100

> I understand something incorrectly?

Fixed.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from From [email-masked]  Sun Jan 13 01:13:42 2002
Date: Sun, 13 Jan 2002 13:00:40 +0600
From: "Dmitry Yu. Bolkhovityanov" <[email-masked]>
To: [email-masked]
Subject: Re: Exec in fvwm
Sender: [email-masked]

On Sun, 13 Jan 2002, Alexander Kotelnikov wrote:

> >>>>> On Sat, 12 Jan 2002 20:56:25 -0500
> >>>>> "Dan" == Dan Espen <[email-masked]> wrote:
> Dan> 
> Dan> Alexander Kotelnikov <[email-masked]> writes:
> >> Hello once again.
> >> 
> >> Using setsid() was a bit husty. setpgrp() is enough. 
> Dan> 
> Dan> The man page says setpgrp is a BSDism.
> Dan> For SVR4 setpgid would be the right thing to use.
> 
> of course we can use setpgid(0,0), but setpgrp() is in SUSV2.

	setpgrp() is nonportable: in SysV and Linux it is int
setpgrp(void), while on *BSD it is setpgrp(pid_t pid, pid_t pgrp).
 
> BTW, I was surprised finding out fvwm use fork instead of vfork for
> Exec. There is a note about that not all platforms support vfork butwe
> can easily check it in configure time.

	vfork() is a disaster and shouldn't be used.  For a historic
description, read the Linux manpage for vfork(2), especially the 2nd
paragraph in the BUGS section.

	As to what to use for child processes before exec(): the setsid()
is the right way to go.  In case if we don't want setsid(), we should
disassociate from a controlling tty "manually".  At least in Linux and
*BSD it is achieved with a code like

fd = open("/dev/tty", O_RDWR);
if (fd >= 0)
{
  ioctl(fd, TIOCNOTTY, NULL);
  close(fd);
}

However, this isn't as portable as setsid() and, AFAIR, requires a prior
setpgrp().

	Well, after writing above text I've found an excerpt from
UnixWorld Online at http://www.ic-chernobyl.kiev.ua/~ak/12.lst.html, and
the code is (Listing 3):

      if (fork() != 0)
          exit(0);  /* parent terminates */
      /* child code: */
      #ifdef BSD
      setpgrp(0, getpid());  /* change process group */
      if ((fd = open("/dev/tty", O_RDWR)) >= 0) { /* open control tty */
          ioctl(fd, TIOCNOTTY, 0);  /* and lose it */
          close(fd);
      }
      #else /* System V */
      setpgrp();  /* lose controlling terminal and change process group */
      #endif

	BTW, I've looked through SysV setpgrp manpage (Solaris 2.5.1) and
it explicitly states that setpgrp() "...releases its controlling
terminal".

	_________________________________________
	  Dmitry Yu. Bolkhovityanov
	  The Budker Institute of Nuclear Physics
	  Novosibirsk, Russia