[PD-dev] [PD] Problem in os x 10.5.1?

David Plans Casal dataflow at davidcasal.com
Thu Feb 14 19:21:32 CET 2008


Hello

On 1 Feb 2008, at 14:54, Russell Bryant wrote:

> Try the attached patch to see if moving building the sys_guicmd to  
> before the
> fork fixes it.  If it doesn't, try commenting out the call to  
> seteuid().
> Between those two, you should be able to find out what it's  
> complaining about.

So, you may have heard 0.40.1 was the bugfix that never was (my  
fault...)

I've now come to grips with packages/darwin_app and I'm building  
successfully on 10.5.1, so can test patches to resolve the fork()  
issue easily enough.

However, both setting the sys_guicmd call before the fork _and_  
commenting out the call to setuid() fail to get rid of the messages:

14/02/2008 18:13:02 [0x0-0x185185].org.puredata.pd.wish[66305] Break  
on  
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__ 
() to debug.

coming up in /var/log/syslog when starting pd

Below are the offending bits of s_inter.c as they stand right now; can  
anyone see what's wrong with this picture?

#endif
             sys_guicmd = cmdbuf;
         }

         if (sys_verbose)
             fprintf(stderr, "%s", sys_guicmd);

         childpid = fork();
         if (childpid < 0)
         {
             if (errno) perror("sys_startgui");
             else fprintf(stderr, "sys_startgui failed\n");
             return (1);
         }
         else if (!childpid)                     /* we're the child */
         {
             /*seteuid(getuid());*/          /* commented out to see  
if that's what causes exec errors /* /* lose setuid priveliges */

#ifndef __APPLE__
                 /* the wish process in Unix will make a wish shell and
                     read/write standard in and out unless we close the
                     file descriptors.  Somehow this doesn't make the  
MAC OSX
                         version of Wish happy...*/
             if (pipe(stdinpipe) < 0)
                 sys_sockerror("pipe");
             else
             {
                 if (stdinpipe[0] != 0)
                 {
                     close (0);
                     dup2(stdinpipe[0], 0);
                     close(stdinpipe[0]);
                 }
             }
#endif
             execl("/bin/sh", "sh", "-c", sys_guicmd, (char*)0);
             perror("pd: exec");
             _exit(1);
        }




More information about the Pd-dev mailing list