source: branches/samba-3.2.x/source/web/startstop.c@ 536

Last change on this file since 536 was 245, checked in by Herwig Bauernfeind, 17 years ago

Made SWAT workable (#51, 54, 55) in 3.2 branch

File size: 3.7 KB
Line 
1/*
2 Unix SMB/CIFS implementation.
3 start/stop nmbd and smbd
4 Copyright (C) Andrew Tridgell 1998
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#include "includes.h"
21
22#ifdef __OS2__
23 /* fork() in klibc on OS/2 ends all children when parent
24 is closed, therefore we use spawn() */
25#include "process.h"
26#define SWAT_HELPER(WHAT, WHO) \
27 asprintf(&binfile, "%s/swathelp.cmd", get_dyn_SWATDIR()); \
28 int rc; \
29 rc=spawnl(P_NOWAIT, binfile, binfile, #WHAT, #WHO, NULL);
30#endif
31
32#include "web/swat_proto.h"
33#include "dynconfig.h"
34
35
36/** Startup smbd from web interface. */
37void start_smbd(void)
38{
39 char *binfile = NULL;
40