-
Founded in 1999, Beijing Yizhong Post Information Technology Co., Ltd. is an overall solution provider of mail system software, and is committed to providing professional technology platforms and complete network communication solutions for enterprises, education and other industry customers; Up to now, it has Email e-mail system, E-mail ePush information push system, E-mail intelligent operation and maintenance platform, including E-mail gateway system, E-mail instant messaging system, E-mail filing system, E-mail alumni mailbox system, overseas ** system and other products of mail supporting products and solutions for various industries; With advanced technology, stable performance and high-quality after-sales service, we have built an efficient, safe and stable communication platform for users.
-
Recently working under Linux, some specified programs need to be called to specifyshellThe script does the specified work, and has done a similar function before, calling the system function to execute the specified script, which was not cared about beforeshellWhether the script is executed successfully or not, the current function needs to be based on itshellWhether the script is executed successfully or not, I queried the description of the system function below, and there is this article for note.
Function: Invoke bin sh -c to execute the script command specified by the brother
Regular Usage:
About the return value:
The answer is all wrong.
MAN Manual.
It's dizzy to look at, but if you understand the execution process of the system, it's easy to understand, and the function execution is divided into the following stages.
Phase 1: Create a child process and other preparations. If it fails, -1 is returned
Phase 2: Call the bin sh pull up script, if the pull up fails or the shell is not executed normally, the reason value is written to the ret.
Phase 3: If the shell script is executed successfully, the return value of the shell script is written to the ret.
As can be seen from the above, no matter what value the shell script returns, as long as bin sh is called and the execution process is not interrupted by the signal, it is considered to be a normal end. Because the script is executed in a subprocess, the only way to get the successful execution of the script is to use the two macros provided by the system.
Since we generally judge whether the script is executed successfully by the return value in the shell, it returns 0 and integer if it succeeds. Therefore, to determine whether a script is successfully executed, three conditions should be met:
Note: When the shell script does not exist, there is no execution condition, etc., the first two conditions will also be true, at this time, wexitstatus(ret) is 127, so 127 cannot be used as the return value in the shell script, and the exception return value in the shell script is best incremented from 1 and successfully returned to 0.
There are many hidden pitfalls, and you need to understand the principle in depth in order to use it better, and you can also use other implementations to complete the same function.
Finally, say to yourself, write more, think more, and summarize more.
-
system means system itself system.
-
I don't know what's in it? I don't know what he means, so let's look it up on the Internet, my English is not good!
-
The syst inside the linu fork, what the hell is this? I don't understand this very well, and I don't know the specific meaning.
-
sys: The user with the highest Oracle privileges can log in only as SysDBA or Sysoper, but not in normal mode.
system: has the DBA or SYSDBA permission or role, and can log in as a common user.
1) The most important difference is the importance of the stored data.
sys] The base tables and views of all oracle data dictionaries are stored in the sys user, and these base tables and views are critical to the operation of oracle, are maintained by the database itself, and cannot be manually changed by any user.
The Sys user has the roles or permissions such as DBA, SysDBA, and Sysoper, and is the user with the highest authority in Oracle.
system] The user is used to store the second-level internal data, such as some features of Oracle or the management information of tools. The system user has the permissions of the common DBA role.
2) The second difference is the difference in permissions.
system] users can only log in to EM as normal, unless you have granted it sysdba system permissions or syspoer system permissions.
The sys] user has the "sysdba" or "sysoper" system permission, and can only use these two identities to log in to EM, not normal.
Log in to Oracle as a sys user and run the select * from v $pwfile users command. You can query the user with the sysdba permission.
while((len=!=-1) Here will get the data entered by the keyboard, it is a blocking method, len will return the maximum data byte value, if the loop is no data, it will return -1, you enter does not mean that the data is over, you enter is actually it''''This means that the data has not been fetched, and the loop will continue, and then it will go to the read() method, and continue to enter, and if you want to end, you must define the end mark. >>>More
I don't understand very well, you don't quite understand it. >>>More
Are you sure it's ??
I've encountered the problem of NV's graphics card driver, due to the problem of installing a mismatched graphics card, if you have this problem, then go back to **** to install the matching driver it168 or my drivers**go** generally. >>>More
I don't think I need to say anything.
Start Menu - Run - Enter msconfig Enter.
Put ** in the boot bar insideJust remove the tick in front of the dll. >>>More