Remeoved alarm() function for Windows
This commit is contained in:
+1
-1
@@ -144,7 +144,7 @@
|
||||
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</BrowseInformation>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\mxml\mxml.c">
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HAVE_STRLCPY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\regex.c">
|
||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">TurnOffAllWarnings</WarningLevel>
|
||||
|
||||
+7
-1
@@ -28530,12 +28530,16 @@ void hup_handler(int sig)
|
||||
_hup = TRUE;
|
||||
}
|
||||
|
||||
#ifndef OS_WINNT
|
||||
|
||||
void alarm_handler(int sig)
|
||||
{
|
||||
if (sig)
|
||||
alarm(3);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
@@ -28790,8 +28794,10 @@ void server_loop(void)
|
||||
alarm_handle.sa_flags = 0;
|
||||
sigaction(SIGALRM, &alarm_handle, NULL);
|
||||
|
||||
#ifndef OS_WINNT
|
||||
alarm(3); // prevents blocking send() operations
|
||||
|
||||
#endif
|
||||
|
||||
/* give up root privilege */
|
||||
if (geteuid() == 0) {
|
||||
if (!getcfg("global", "Grp", str, sizeof(str)) || setegroup(str) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user