On 08/29/12 14:15, Greg Ercolano wrote:
> On 08/29/12 06:01, Bogdan Popescu wrote:
>> Hello everyone,
>>
>> I've recently migrated/rewrote our small communication application from
>> Perl to C++ and used FLTK for the GUI part, the idea was to be able to
>> start using it on Win/Mac rather than giving Linux boxes to users...
>>
>> As it's made of 2 pieces, the receiver (which is a daemon/service running
>> under the user that is logged in) and the sender (a small app that search
>> for and connect to the daemon/service running on the receiver's side), I
>> needed the daemon to keep the FLTK code and make sure the window is
>> displayed with the sender details... everything seems to work fine under
>> Linux/X11, though on the Mac side the code compiles fine but some settings,
>> mainly FL_Window::show(), fail under fork() and the child segfaults (and
>> the window is not displayed), if I run the code without forking anything it
>> seems to work fine... any idea how I could work around this problem or did
>> I miss anything?
>
> Oh man, don't get me started on Macs and its limitations with fork()
> and window manager stuff, esp. in the context of daemons.
> <mad rant>
BTW, sorry -- not ranting at you OP, I'm PO'ed at APPL's
OS designers.
The TN2083 thing is a giant PITA especially in the context of
distributed computing.
Perhaps doing one of their 'agent' approaches recommended in the
above tech note is best for your situation. Just be aware that this
means you can loose parent/child relationships, so you'll have to do
things like detect if one client/server have disappeared as part of
your protocol between them.
Or perhaps you can avoid this all with threads.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk