exec 11的退出代码含义 [英] exec Exit Code Meaning for 11

查看:151
本文介绍了exec 11的退出代码含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux Web服务器上使用以下代码

I'm using the following code on a linux web server

$error = exec('phantomjs table1.js', $op, $code);
echo $code; // prints 11 on screen


table1.js

var page = require('webpage').create();
var url = 'table1.php';
page.open(url, function (status) {
    page.render('ss/table1.png');
    phantom.exit();
});


table1.php

echo '<h1>This should be converted to an image</h1>';

我经历了 链接,但其中未列出该代码.知道这个退出代码代表什么吗?

I went through this link but that code isn't listed there. Any idea what this exit code stands for?

推荐答案

代码11是分段错误":分段错误(也称为segfault)是由程序试图在内存中分配数据时引起的.未分配给程序.它指示程序错误,通常(如果不是总是)使程序崩溃.在您的情况下,segfault可能是由phantomjs引起的,它表明可能是旧版本或Beta版本.

Code 11 is a "segmentation fault": A segmentation fault (also segfault) is caused by a program when it tries to allocate data in a piece of memory that is not assigned to the program. It indicates a program error and usually (if not always) crashes the program. In your case, the segfault probably is caused by phantomjs, which indicates perhaps an old or beta version.

这篇关于exec 11的退出代码含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆