The function setpgrp() seems to need 2 parameters in FreeBSD:
In the clamav-milter.c we find:
[...]
* 0.65a 19/11/03 Close cmdSocket earlier
* Added setpgrp()
[...]
if(!cfgopt(copt, "Foreground")) {
switch(fork()) {
case -1:
perror("fork");
return EX_TEMPFAIL;
case 0: /* child */
break;
default: /* parent */
return EX_OK;
}
close(0);
close(1);
close(2);
open("/dev/null", O_RDONLY);
if(open("/dev/console", O_WRONLY) == 1)
dup(1);
setpgrp();
}
--> building after ./configure --enable-milter
[...]
PES_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRINGS_H=1
-DHAVE_STRING_H=1 -DHAVE_SYS_MMAN_H=1
-DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H
=1 -DHAVE_MALLOC_H=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4
-DHAVE_ZLIB _H=1 -DHAVE_BZLIB_H=1 -DHAVE_GMP=1
-DCLAMD_USE_SYSLOG=1 -D_REENTRANT=1 -DCLAMAVU
SER=\"clamav\" -DCLAMAVGROUP=\"clamav\" -DDB1NAME=\"main.cvd\" -DDB2NAME=
\"daily .cvd\" -DDATADIR=\"/usr/local/share/
clamav\" -DCONFDIR=\"/usr/local/etc\" -DC_UR
ANDOM=1 -DCL_THREAD_SAFE=1 -DC_BSD=1 -DBUILD_CLAMD=1 -DWORDS_LITTLEENDIAN=1
-I. -I. -I../clamd -I../libclamav -I../
clamscan -g -O2 -c `test -f 'clamav-milte
r.c' || echo './'`clamav-milter.c
In file included from clamav-milter.c:251:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
clamav-milter.c: In function `main':
clamav-milter.c:675: too few arguments to function `setpgrp'
*** Error code 1
---> end <---
From the man setpgrp:
--> begin <---
NAME
setpgid, setpgrp -- set process group
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int setpgid(pid_t pid, pid_t pgrp);
int setpgrp(pid_t pid, pid_t pgrp);
DESCRIPTION
Setpgid() sets the process group of the specified process pid to the
specified pgrp. If pid is zero, then the call applies to the current
process.
If the invoker is not the super-user, then the affected process must have
the same effective user-id as the invoker or be a descendant of the
invoking process.
RETURN VALUES
The setpgid() function returns the value 0 if successful; otherwise the
value -1 is returned and the global variable errno is set to indicate the
error.
ERRORS
Setpgid() will fail and the process group will not be altered if:
[ESRCH] The requested process does not exist.
[EPERM] The effective user ID of the requested process is dif-
ferent from that of the caller and the process is not
a descendent of the calling process.
[...]
Thanks for attention.
--
Best Regards,
Gianmarco Giovannelli , �"Unix expert since yesterday"
http://www.gufi.org/~gmarco
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Clamav-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-devel