AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Script to reproduce hlds crash (https://forums.alliedmods.net/showthread.php?t=168440)

Mlk27 09-29-2011 06:52

Script to reproduce hlds crash
 
This probably sound stupid but could someone give me a piece of code that could manually trigger segmentation fault crash on hlds? Hlds doesn't completely exit its process when this happens, it just stall there until you manually kill it.

I'm writing a daemon script to restart hlds when this sort of crash occurs so I need something to test this on.

gamer99 09-29-2011 07:03

Re: Script to reproduce hlds crash
 
use Csdeath

The Inhabitant Of Heavens 09-29-2011 08:24

Re: Script to reproduce hlds crash
 
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_plugin"Killer""0.1""Lt.RAT");

    
register_srvcmd("amx_crash""crash");
    
register_srvcmd("amx_crash_msg""crash_msg");
}

public 
crash()
{
    while(
1)
    {}
}

public 
crash_msg()
{
    while(
1)
    {
        
engfunc(EngFunc_CreateEntity);
    }    



MyPc 09-29-2011 14:57

Re: Script to reproduce hlds crash
 
Why just you use server_cmd and type "exit" or "quit" to make the hlds server to quit automatically.

gamer99 09-30-2011 02:28

Re: Script to reproduce hlds crash
 
Quote:

Originally Posted by MyPc (Post 1565483)
Why just you use server_cmd and type "exit" or "quit" to make the hlds server to quit automatically.

it is because when you do quit the process is no more there. And he is trying to do like if the process is still there but it is hanged then only his script will kill the process and restart the server.


@Mlk27 -- Can you please share the script if it's working. I need that script badly. When I started my server with windows I have HLSM which did the job very good. But now I am using linux and don't have such good tool :(.


All times are GMT -4. The time now is 23:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.