Re: [system-tools] g-s-t 1.2.0 does not work on FreeBSD
- From: Carlos Garnacho <carlosg gnome org>
- To: Joe Marcus Clarke <marcus FreeBSD org>
- Cc: system-tools-list gnome org
- Subject: Re: [system-tools] g-s-t 1.2.0 does not work on FreeBSD
- Date: Sat, 12 Mar 2005 21:18:34 +0100
On Thu, 2005-03-10 at 16:19 -0500, Joe Marcus Clarke wrote:
> In a nutshell, it hangs. It really depends on the FreeBSD version as to
> where it hangs. On 5.X and 6.X, it will hand after authenticating the
> user. Basically, since gst-auth.c closes stderr, this causes su to
> SIGSTOP the tool's backend process, and thus gst-tool.c gets stuck in an
> infinite poll() loop.
>
> On FreeBSD 4.X, the user never sees the authentication dialog. If the
> tool is run as root, everything seems to work, but hangs when quitting.
> I added some debugging, and found that under 4.X, g-s-t never reads
> anything from the backend su process. That is, it never sees the
> "Password:" prompt, and thus hangs in a poll() loop forever.
>
> Everything used to work on all versions before the switch to use pipes.
> Attached are patches that get the tools working under 5.X and 6.X
> again, but I'd like to know if there's anything I should be looking at
> for the 4.X problems (i.e. the hang when run as non-root, and the hang
> on exit). What would be lost if g-s-t reverted to the old master file
> descriptor on FreeBSD only? Thanks.
I experimented when first ported GST to FreeBSD and had to tweak a bit
the pseudoterminal's echo disabling, but when I switched to the async
communication commented out that part [1] since it didn't seem to be
necessary anymore, maybe it's still necessary for the FreeBSD's
pseudoterm implementation?
I you switch back to the old code, the communication would be
synchronous again, blocking the UI anytime a backend call takes a bit
longer to return (ie: DHCP or PPP interfaces enabling) instead of
showing a dialog with a progress bar to tell the user that it's doing
something
Regards
[1] grep for tcsetattr in gst-auth.c
>
> Joe
>
> plain text document attachment (patch-src_common_gst-tool.c)
> --- src/common/gst-tool.c.orig Thu Mar 10 14:39:54 2005
> +++ src/common/gst-tool.c Thu Mar 10 14:40:00 2005
> @@ -1653,7 +1653,7 @@ poll_backend (GstTool *tool)
> struct pollfd fd;
>
> fd.fd = tool->read_fd;
> - fd.events = POLLIN || POLLPRI;
> + fd.events = POLLIN | POLLPRI;
Fuck!! weird typo, sorry
>
> while (poll (&fd, 1, 100) <= 0) {
> while (gtk_events_pending ())
> plain text document attachment (patch-src_common_gst-auth.c)
> --- src/common/gst-auth.c.orig Thu Mar 10 14:39:18 2005
> +++ src/common/gst-auth.c Thu Mar 10 14:39:50 2005
> @@ -142,12 +142,12 @@ gst_auth_run_term (GstTool *tool, gchar
> unsetenv("LANG");
> unsetenv("LANGUAGE");
>
> - dup2 (p[1], 1);
> - dup2 (p[1], 2);
> + dup2 (p[1], STDOUT_FILENO);
> + /*dup2 (p[1], 2);*/
> close (p[0]);
>
> execv (args[0], args);
> - exit (255);
> + _exit (255);
> } else {
> #ifndef __FreeBSD__
> /* Linux's su works ok with echo disabling */
> _______________________________________________
> system-tools-list mailing list
> system-tools-list gnome org
> http://mail.gnome.org/mailman/listinfo/system-tools-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]