Remeoved alarm() function for Windows

This commit is contained in:
2014-01-13 08:56:32 +01:00
parent d153ab0ba0
commit 15ecf9fe52
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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) {