Re: dual monitor configuration

Albert Max Lai (amlai@watsun.cc.columbia.edu)
Tue, 22 Dec 1998 20:39:56 -0500 (EST)


On Sat, 19 Dec 1998, David Mihm wrote:

allanon- I'm cc this to you since you are listed as being part of the team
for the main executable. Sorry if you are not the correct person to
address this to.

> I'd like to thank you for your efforts in helping, and if you find out
> anything else or other problems with dual display, please feel free to
> shoot a mail off to me.

Well, even better news. I figured how to patch the source code to make it
work the way it was intended to (at least on my machine... I don't have
another machine to try it on). It's actually only a one line change. I
think that execl is the wrong function to call because, from the docs for
it, it replaces the current process with the new one. What it seems that
we want to do is spawn another process, which would seem that we would
like to fork, but we need to pass different parameters. So, as far as I
know, system is the only function able to do that. It looks like
system will do what the execl call was intended to do. From the man page: 

       system() executes a command specified in string by calling
       /bin/sh -c string, and returns after the command has  been
       completed.

Is there a reason why execl() was used instead of system()? Anyways,
here's the patch:

--- AfterStep-1.6.0/src/afterstep/afterstep.c   Thu Dec 10 18:34:43 1998
+++ afterstep.c Tue Dec 22 19:58:43 1998
@@ -248,7 +248,7 @@
                }
              strcat (message, " &\n");
 
-             execl ("/bin/sh", "sh", "-c", message, (char *) 0);
+             system(message);
            }
        }
     }

If there are any questions, feel free to contact me.

--
Albert Lai <amlai@columbia.edu>           1018D East Campus
Residential Computer Consultant           411 W. 116th St.
Columbia University                       New York, NY 10027
http://www.columbia.edu/~aml61            (212)853-4854