Re: Mach Bootstrap_create_server, "server_command" parameter
Re: Mach Bootstrap_create_server, "server_command" parameter
- Subject: Re: Mach Bootstrap_create_server, "server_command" parameter
- From: mm w <email@hidden>
- Date: Mon, 16 Feb 2009 13:57:35 -0800
launchd src is just a good illustration of a server bootstrap
try to bootstrap this:
---------------------
#!/bin/sh
# senderd or providerd serverd
now=`date '+%H'`
i=0
while [ $now -lt 23 ]
do
notifyutil -s "com.domain.app.service" $i -p "com.domain.app.service"
sleep 5
let "i += 1"
now=`date '+%H'`
done
---------------------
---------------------
#!/bin/sh
# receiverd or clientd what you want
now=`date '+%H'`
while [ $now -lt 23 ]
do
notifyutil -v -w "com.domain.app.service"
now=`date '+%H'`
done
---------------------
Cheers!
On Mon, Feb 16, 2009 at 1:00 PM, Michael Prenez-Isbell
<email@hidden> wrote:
> Thanks, mm.
>
> Ook, so it's an executable, cool.
>
> I hate to sound so newbie stupid, but what am I supposed to do with that
> source code? Are you telling me that launchd launches another launchd that I
> compile from the source code you sent?
>
> What exactly does this executable DO? I saw one example where someone used
> /usr/sbin/notifyd. I tried that and that didn't work either.
>
> Michael
>
>
>
>
> On 2/16/09 3:47 PM, "mm w" <email@hidden> wrote:
>
>> http://www.opensource.apple.com/darwinsource/projects/other/launchd-152/
>>
>> http://en.wikipedia.org/wiki/Bootstrapping_(computing)
>>
>> Cheers!
>>
>>> executable?
>> YES
>>
>>
>> On Mon, Feb 16, 2009 at 12:37 PM, Michael Prenez-Isbell
>> <email@hidden> wrote:
>>>
>>>
>>> Mach Bootstrap_create_server, "server_command" parameter
>>> --------------------------------------------------
>>>
>>> On the bootstrap_create_server command, one of the parameters is "cmd_t
>>> server_command"
>>> In singh's Mac OS X Internals book he gives this example
>>>
>>> kr = bootstrap_create_server(bootstrap_port, "/tmp/simple_ipc_server",
>>> getuid(), FALSE, &private_port);
>>> EXIT_ON_MACH_ERROR("bootstrap_create_server", kr, BOOTSTRAP_SUCCESS);
>>>
>>> I have no idea what "/tmp/simple_ipc_server" is -- a directory? an
>>> executable?
>>>
>>> If it's is an executable, what is it? the same file I'm calling it from?
>>>
>>> My problem is that, on bootstrap_check_in, when I try to check in the
>>> service I created with bootstrap_create_service, the application freezes.
>>>
>>> I am currently setting up launchd with debugging set up. Per amit's singh's
>>> suggestion in his book.
>>>
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Darwin-kernel mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>>
>>
>
>
>
--
-mmw
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden