• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP isvalidpid函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中isvalidpid函数的典型用法代码示例。如果您正苦于以下问题:PHP isvalidpid函数的具体用法?PHP isvalidpid怎么用?PHP isvalidpid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了isvalidpid函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: header

header("Expires: " . gmdate("D, j M Y H:i:s", time()) . " GMT");
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
*/
require_once "guiconfig.inc";
class QueueStats
{
    public $queuename;
    public $queuelength;
    public $pps;
    public $bandwidth;
    public $borrows;
    public $suspends;
    public $drops;
}
if (!file_exists("{$g['varrun_path']}/qstats.pid") || !isvalidpid("{$g['varrun_path']}/qstats.pid")) {
    /* Start in the background so we don't hang up the GUI */
    mwexec_bg("/usr/local/sbin/qstats -p {$g['varrun_path']}/qstats.pid");
    /* Give it a moment to start up */
    sleep(1);
}
$fd = @fsockopen("unix://{$g['varrun_path']}/qstats");
if (!$fd) {
    $error = gettext("Something wrong happened during communication with stat gathering.");
} else {
    $stats = "";
    while (!feof($fd)) {
        $stats .= fread($fd, 4096);
    }
    fclose($fd);
    @file_put_contents("{$g['tmp_path']}/qstats", $stats);
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:31,代码来源:status_queues.php


示例2: sprintf

                $pkg_success_txt = sprintf(gettext('<b>%1$s</b> reinstallation successfully completed.'), $pkgname);
                $pkg_fail_txt = sprintf(gettext('<b>%1$s</b> reinstallation failed!'), $pkgname);
                $pkg_wait_txt = sprintf(gettext('Please wait while the reinstallation of <b>%1$s</b> completes.'), $pkgname);
            } else {
                $panel_heading_txt = gettext("Package Installation");
                $pkg_success_txt = sprintf(gettext('<b>%1$s</b> installation successfully completed.'), $pkgname);
                $pkg_fail_txt = sprintf(gettext('<b>%1$s</b> installation failed!'), $pkgname);
                $pkg_wait_txt = sprintf(gettext('Please wait while the installation of <b>%1$s</b> completes.'), $pkgname);
            }
        }
    }
}
if ($confirmed) {
    // XXX: What if the user navigates away from this page and then comes back via his/her "Back" button?
    $pidfile = $g['varrun_path'] . '/' . $g['product_name'] . '-upgrade.pid';
    if (isvalidpid($pidfile)) {
        $start_polling = true;
    }
    ?>
	<input type="hidden" name="id" value="<?php 
    echo $_REQUEST['id'];
    ?>
" />
	<input type="hidden" name="mode" value="<?php 
    echo $pkgmode;
    ?>
" />
	<input type="hidden" name="completed" value="true" />
	<input type="hidden" name="confirmed" value="true" />
	<input type="hidden" id="reboot_needed" name="reboot_needed" value="no" />
开发者ID:NewEraCracker,项目名称:pfsense,代码行数:30,代码来源:pkg_mgr_install.php


示例3: install_cron_job

                    install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*");
                    break;
                case 'weekly':
                    install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "0");
                    break;
                case 'monthly':
                    // fall through
                // fall through
                default:
                    install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*");
            }
            $config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
        }
        write_config();
        // Kill filterdns when value changes, filter_configure() will restart it
        if ($old_aliasesresolveinterval != $config['system']['aliasesresolveinterval'] && isvalidpid("{$g['varrun_path']}/filterdns.pid")) {
            killbypid("{$g['varrun_path']}/filterdns.pid");
        }
        $retval = 0;
        $retval = filter_configure();
        if (stristr($retval, "error") != true) {
            $savemsg = get_std_save_message($retval);
            $class = 'success';
        } else {
            $savemsg = $retval;
            $class = 'warning';
        }
    }
}
$pgtitle = array(gettext("System"), gettext("Advanced"), htmlspecialchars(gettext("Firewall & NAT")));
include "head.inc";
开发者ID:curtiszimmerman,项目名称:pfsense,代码行数:31,代码来源:system_advanced_firewall.php


示例4: filter_configure

 /**
  * Wrapper for filter_configure()
  *
  * @param string $username
  * @param string $password
  *
  * @return bool
  */
 public function filter_configure($username, $password)
 {
     $this->auth($username, $password);
     global $g, $config;
     filter_configure();
     system_routing_configure();
     setup_gateways_monitor();
     relayd_configure();
     require_once "openvpn.inc";
     openvpn_resync_all();
     /*
      * The DNS Resolver and the DNS Forwarder may both be active so
      * long as * they are running on different ports.
      * See ticket #5882
      */
     if (isset($config['dnsmasq']['enable'])) {
         /* Configure dnsmasq but tell it NOT to restart DHCP */
         services_dnsmasq_configure(false);
     } else {
         /* kill any running dnsmasq instance */
         if (isvalidpid("{$g['varrun_path']}/dnsmasq.pid")) {
             sigkillbypid("{$g['varrun_path']}/dnsmasq.pid", "TERM");
         }
     }
     if (isset($config['unbound']['enable'])) {
         /* Configure unbound but tell it NOT to restart DHCP */
         services_unbound_configure(false);
     } else {
         /* kill any running Unbound instance */
         if (isvalidpid("{$g['varrun_path']}/unbound.pid")) {
             sigkillbypid("{$g['varrun_path']}/unbound.pid", "TERM");
         }
     }
     /*
      * Call this separately since the above are manually set to
      * skip the DHCP restart they normally perform.
      * This avoids restarting dhcpd twice as described on
      * ticket #3797
      */
     services_dhcpd_configure();
     local_sync_accounts();
     return true;
 }
开发者ID:KyleJohnstonNet,项目名称:pfsense,代码行数:51,代码来源:xmlrpc.php



注:本文中的isvalidpid函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP iswhitelist函数代码示例发布时间:2022-05-15
下一篇:
PHP istrlen函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap