Help needed to with tevent and samba_runcmd
Stefan (metze) Metzmacher
metze at samba.org
Tue Sep 4 03:09:12 MDT 2012
> In file_server/file_server.c I'm trying to get the variable 'task' from
> s3fs_task_init() to file_server_smbd_done()
> What I want to do is call
> task_server_terminate(task, "Failed to startup s3fs smb task", true);
> when the smbd task exits. The idea is that if smbd fails after the
> exec(), such as failing to bind to ports, we will shut down all of
> 'samba' and not leave it half-working.
> However, I suspect that the runcmd code isn't built quite per the
> standard tevent pattern - calling:
> + struct tevent_req *req = tevent_req_callback_data(subreq, struct
> + struct task_server *task = tevent_req_data(req, struct
> fails because we don't have the right req/subreq pattern.
It should be
+ struct task_server *task =
+ struct task_server);
> However, I'm a little at sea on tevent, so if someone has the time to
> help me sort this out, it will help our users with a more reliable full
> failure of 'samba' when the ports are already in use.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
More information about the samba-technical