⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mkchild.pl

📁 一个rst守护程序
💻 PL
字号:
#!/usr/bin/perl## Just a simple library to start a forked# child process.## Written by Bastian Ballmann [ bytebeater@crazydj.de ]# http://www.crazydj.de ## Last Update: 29.07.2002## This code is licensed under the GPL# Create a child process and start a subroutinesub mkchild{    # Referenz auf die aufzurufende Subroutine    my $sub = shift;    # Reference auf einen Hash mit Parametern    my $args = @_;    # Fork child process    my $pid = fork();    die "Cannot fork a child process!\n$!\n" unless defined $pid;    if($pid == 0)    {	# Call the subroutine	if(ref($sub))	{	    &$sub(%$args);	}	# Execute via system() call	else	{	    system("$sub");	}    }}1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -