CN110928596B - Method and device for killing resident process - Google Patents
Method and device for killing resident process Download PDFInfo
- Publication number
- CN110928596B CN110928596B CN201811028165.4A CN201811028165A CN110928596B CN 110928596 B CN110928596 B CN 110928596B CN 201811028165 A CN201811028165 A CN 201811028165A CN 110928596 B CN110928596 B CN 110928596B
- Authority
- CN
- China
- Prior art keywords
- resident process
- target resident
- target
- killing
- mark
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 322
- 238000013515 script Methods 0.000 claims abstract description 27
- 230000006870 function Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 9
- 238000001514 detection method Methods 0.000 claims description 8
- 239000003550 marker Substances 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 8
- 238000004883 computer application Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a method and a device for killing resident processes, wherein the method comprises the following steps: after receiving a self-defining signal carrying a specific identifier, adding a receiving mark for indicating that the specific identifier is received at a designated position of a target resident process, wherein the specific identifier is used for identifying and killing the target resident process; after the task in the target resident process is executed, detecting whether a receiving mark is added at a designated position of the target resident process; if yes, executing the killing operation on the target resident process. Therefore, by adding the receiving mark for indicating whether the signal carrying the specific mark is received or not at the designated position of the target resident process, the resident process can not be killed immediately after receiving the self-defined signal carrying the specific mark, but the resident process is killed after the script is executed, so that the problem of script interruption in execution caused by the fact that the process is immediately exited can be effectively avoided.
Description
Technical Field
The present invention relates to the field of computer application technologies, and in particular, to a method and apparatus for killing a resident process.
Background
In general, when a new item is online, its real code directory is differentiated by version number, and then a soft connection is made to point to an item directory configured by the nginx (i.e., engine x, a high-performance HTTP and reverse proxy server), some resident scripts inevitably need to be written in the item directory, and since the new item is online and changed to different extents, in order to ensure normal operation of the program, these resident scripts in the old item directory need to be killed, and then scripts under the new item directory are started.
In the prior art, in the process of killing old scripts, the old scripts are usually deleted directly, i.e. the script process is ended directly, and thus, the scripts in operation are often interrupted.
Disclosure of Invention
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a method and apparatus for killing resident processes that overcomes or at least partially solves the above problems.
According to one aspect of the invention, a method for killing a resident process is provided, which comprises the steps of adding a receiving mark for indicating that a specific identifier is received at a designated position of a target resident process after receiving a custom signal carrying the specific identifier, wherein the specific identifier is used for identifying to kill the target resident process;
when the task in the target resident process is executed, detecting whether the receiving mark is added at the appointed position of the target resident process;
if yes, executing killing operation on the target resident process.
Optionally, when the task in the target resident process is executed, if the receiving mark is not detected to be added in the designated position of the target resident process, continuing to execute the corresponding task by using the target resident process.
Optionally, the resident process comprises a resident process executing a PHP script.
Optionally, the method further comprises: defining a specific identifier for identifying the process killing the target resident process;
registering the custom semaphore and a corresponding processing function in the target resident process, wherein the processing function is used for analyzing the custom signal, and adding the receiving mark at a designated position of the target resident process after analyzing that the custom signal carries the specific identifier.
Optionally, registering the custom semaphore in the target resident process includes: registering a sigusar 2 semaphore in the target resident process.
Optionally, adding a receiving tag of a specific identifier at a specified location of the target resident process includes:
and adding the receiving mark of the specific identification at the process starting position of the target resident process.
Optionally, after performing the killing operation on the target resident process, the method further includes:
and starting a new resident process, and executing tasks by using the new resident process to replace the target resident process.
According to another aspect of the present invention, there is also provided an apparatus for killing a resident process, comprising:
the adding module is suitable for adding a receiving mark for indicating that the specific mark is received at the appointed position of the target resident process after receiving the self-defined signal carrying the specific mark, wherein the specific mark is used for marking to kill the target resident process;
the detection module is suitable for detecting whether the receiving mark is added at the appointed position of the target resident process or not when the task in the target resident process is executed;
and the process killing module is suitable for executing killing operation on the target resident process when the detection module detects that the receiving mark is added at the designated position of the target resident process.
Optionally, the apparatus further comprises:
and the execution module is suitable for continuing to execute the corresponding task by using the target resident process if the receiving mark is not detected to be added at the designated position of the target resident process when the task in the target resident process is executed.
Optionally, the resident process comprises a resident process executing a PHP script.
Optionally, the apparatus further comprises:
a definition module adapted to define a specific identification for identifying the process killing the target resident;
the registration module is suitable for registering the custom semaphore and a corresponding processing function in the target resident process, wherein the processing function is used for analyzing the custom semaphore, and adding the receiving mark at the appointed position of the target resident process after analyzing that the custom semaphore carries the specific mark.
Optionally, the registration module is further adapted to:
registering a sigusar 2 semaphore in the target resident process.
Optionally, the adding module is further adapted to:
and adding the receiving mark of the specific identification at the process starting position of the target resident process.
Optionally, the apparatus further comprises:
and the starting module is suitable for starting a new resident process after the process killing module executes killing operation on the target resident process, and executing tasks by using the new resident process to replace the target resident process.
According to yet another aspect of the present invention there is also provided a computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform the method of killing a resident process as defined in any one of the preceding claims.
According to yet another aspect of the present invention, there is also provided a computing device including: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of killing a resident process as described in any of the above.
In the embodiment of the invention, after the target resident process receives the self-defined signal carrying the specific identifier, a receiving mark for indicating that the specific identifier is received is added at the designated position of the target resident process, after the task in the target resident process is executed, whether the designated position of the target resident process is added with the receiving mark is detected, if the designated position of the target resident process is added with the receiving mark, the signal carrying the specific identifier is received, and the specific identifier is used for identifying and killing the target resident process, so that the killing operation can be executed on the target resident process. Therefore, in the embodiment of the invention, by adding the receiving mark for indicating whether the signal carrying the specific mark is received or not at the designated position of the target resident process, the resident process can not be killed immediately after receiving the self-defined signal carrying the specific mark, but the resident process is killed after the script is executed, so that the problem of script interruption in execution caused by the fact that the process is immediately exited can be effectively avoided. Furthermore, the scheme can also effectively ensure that the script related items iterate orderly.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
The above, as well as additional objectives, advantages, and features of the present invention will become apparent to those skilled in the art from the following detailed description of a specific embodiment of the present invention when read in conjunction with the accompanying drawings.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 illustrates a flow diagram of a method of killing a resident process according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a method of killing a resident process according to another embodiment of the invention;
FIG. 3 illustrates a schematic diagram of an apparatus for killing a resident process according to one embodiment of the invention;
FIG. 4 shows a schematic structural diagram of an apparatus for killing a resident process according to another embodiment of the present invention; and
fig. 5 is a schematic structural view showing an apparatus for killing a resident process according to still another embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
At present, when a topic or other content needs to be built, a resident process is often started, and because a real-time message may come in and need to be consumed, the process cannot be suspended, and the resident process (such as a white true) is usually adopted to read the topic or other content in a dead loop. When the code of the old version of the system or application program is updated, a new version is released, and a new resident process needs to be started to exit the old resident process, namely, the former resident process is killed. How to not influence the normal operation of tasks in a process in the process of killing a resident process, so that the generated data result is not influenced, and the technical problem to be solved by the method is solved.
In order to solve the technical problems, the embodiment of the invention provides a method for killing resident processes. FIG. 1 illustrates a flow diagram of a method of killing a resident process according to one embodiment of the invention. Referring to fig. 1, the method includes at least steps S102 to S108.
Step S102, after receiving the self-defining signal carrying the specific identifier, adding a receiving mark for indicating that the specific identifier is received at the designated position of the target resident process, wherein the specific identifier is used for identifying and killing the target resident process.
Step S104, after the task in the target resident process is executed, detecting whether the receiving mark is added at the designated position of the target resident process. If yes, go to step S106; if not, go to step S108 and end.
Step S106, executing killing operation on the target resident process.
In the embodiment of the invention, after the target resident process receives the self-defined signal carrying the specific identifier, a receiving mark for indicating that the specific identifier is received is added at the designated position of the target resident process, after the task in the target resident process is executed, whether the designated position of the target resident process is added with the receiving mark is detected, if the designated position of the target resident process is added with the receiving mark, the signal carrying the specific identifier is received, and the specific identifier is used for identifying and killing the target resident process, so that the killing operation can be executed on the target resident process. Therefore, in the embodiment of the invention, by adding the receiving mark for indicating whether the signal carrying the specific mark is received or not at the designated position of the target resident process, the resident process can not be killed immediately after receiving the self-defined signal carrying the specific mark, but the resident process is killed after the script is executed, and the problem of script interruption in execution caused by the fact that the process is immediately exited can be effectively avoided. Furthermore, the scheme can also effectively ensure that the script related items iterate orderly.
Referring to step S102, in one embodiment of the present invention, the target resident process needs to define a specific identifier for identifying the killing of the target resident process, for example, define "kill" as the specific identifier of the killing of the target resident process, before receiving the custom signal. Of course, other forms of specific identifiers are also possible, such as letters, character strings, etc. are used as specific identifiers for killing the target resident process, and the embodiment of the present invention is not limited in particular.
In the embodiment of the invention, before the target resident process receives the custom signal, the custom semaphore and the corresponding processing function are registered in the target resident process. The processing function is used for executing corresponding analysis and processing operations after the target resident process receives the custom signal in the follow-up process. For example, the custom signal received by the target bed column process is analyzed, and when the custom signal is analyzed to carry a specific identifier, a receiving mark is added at a designated position of the target resident process.
In one embodiment of the present invention, the registered custom semaphore may be a sigusar 2 semaphore. For example, when there is a code update for an old version of an item and a new version of the item is online, the SIGUSR2 semaphore (i.e., a custom information amount) may be initiated for the resident process by executing the kill-USR2 process PID (Process Identifier, process controller).
With continued reference to step S102, in embodiments of the present invention, it is critical to choose a specified location to add a receipt tag in the target resident process. Because, it is then determined whether the target resident process is to exit or not by detecting whether a receipt flag is added to the target resident process. Therefore, in order to avoid that a task (i.e., a script) in a process detects a receipt flag during execution, an embodiment of the present invention selects to add a receipt flag of a specific identifier at a process start position of a target resident process, that is, to detect whether a receipt flag is added at the process start position when returning to the process start position after a single cycle of execution of the script in the process or when execution of the task is completed.
In addition, the embodiment of the invention can also add the receiving mark at other appointed positions of the target resident process, for example, the receiving mark is added at the tail end of the process, namely, whether the receiving mark is added at the tail end of the process can be detected after the script in the process is executed for one time or when the task is executed, and the condition that the receiving mark is detected in the task executing process can not occur, so that the problem that the task is forced to be interrupted in the executing process is avoided.
In this embodiment, a reception flag indicating that a specific identification has been received may be set to "true", i.e., a flag of kill is set to "true". Of course, other indicia Fu Gelai may be used to represent the receiving indicia, and embodiments of the present invention are not specifically limited herein.
In the embodiment of the present invention, the resident processes may include a resident process executing a PHP (Hypertext Preprocessor ) script, and may also include other resident processes such as shell processes, which are not specifically limited in the embodiment of the present invention.
Referring to step S104 and step S106, in the embodiment of the present invention, after the task in the target resident process is executed, it is detected whether a receiving flag is added at the designated location of the target resident process, and when it is detected that a receiving flag is added at the designated location of the target resident process, a killing operation may be performed on the target resident process, that is, the target resident process exits. And when the receiving mark is not added at the designated position of the target resident process, continuing to execute the corresponding task by using the target resident process.
For example, in combination with the above embodiment, the flag "true" is added to the starting position of the target resident process, and when the task execution of the target resident process is completed and returns to the starting position of the process, if the flag of kill in the target resident process is detected as "true", the target resident process break is dropped, i.e. the target resident process exits. If the kill mark in the target resident process is not detected as true, the current target resident process is continuously used at the moment, and the corresponding task is executed by the current target resident process.
In an embodiment of the present invention, after the killing operation is performed on the target resident process, in order to ensure that the subsequent task can be normally performed, a new resident process needs to be started, so that the task is performed by using the started new resident process to replace the target resident process.
The embodiment of the invention provides another method for killing resident processes. FIG. 2 illustrates a flow diagram of a method of killing a resident process according to one embodiment of the invention. Referring to fig. 2, the method at least includes steps S202 to S212.
Step S202, defining a specific identification for identifying the killing target resident process.
In this step, for example, "kill" may be defined as a specific identifier that kills the target resident process, or other identifiers, letters, etc. may be used as specific identifiers, which are not specifically limited in the embodiment of the present invention.
Step S204, registering the custom semaphore and the corresponding processing function in the target resident process.
For example, the registered custom semaphore may be a sigusar 2 semaphore.
In this step, the processing function is configured to parse the custom signal, and add a receiving tag at a designated location of the target resident process after parsing that the custom signal carries a specific identifier.
Step S206, after receiving the self-defining signal carrying the specific identification, adding a receiving mark for indicating that the specific identification is received at the designated position of the target resident process, wherein the specific identification is used for identifying and killing the target resident process.
Step S208, after the task in the target resident process is executed, detecting whether the receiving mark is added at the designated position of the target resident process. If yes, go to step S210; if not, go to step S212.
Step S210, executing killing operation on the target resident process.
Step S212, executing corresponding tasks by utilizing the target resident process.
In an embodiment of the present invention, after the killing operation is performed on the target resident process, in order to ensure that the subsequent task can be normally performed, a new resident process needs to be started, so that the task is performed by using the started new resident process to replace the target resident process.
Based on the same inventive concept, the embodiment of the present invention further provides a device for killing a resident process, and fig. 3 shows a schematic structural diagram of the device for killing a resident process according to one embodiment of the present invention. Referring to fig. 3, an apparatus 300 for killing a resident process includes at least an add module, a detect module, and a process kill module.
The function of the components or devices of the device 300 based on killing resident processes according to the embodiment of the present invention will be described, and the connection relationship between the components:
the adding module 310 is adapted to add a receiving mark indicating that the specific identifier is received at a designated position of the target resident process after receiving the custom signal carrying the specific identifier, where the specific identifier is used for identifying to kill the target resident process;
the detection module 320 is coupled with the adding module 310 and is adapted to detect whether a receiving mark is added at a designated position of the target resident process after the task in the target resident process is executed;
and a process killing module 330 coupled to the detection module 320 and adapted to perform a killing operation on the target resident process when the detection module 320 detects that the receiving tag is added to the designated location of the target resident process.
In one embodiment of the invention, the resident processes may include resident processes executing PHP scripts.
In an embodiment of the invention, the registration module 360 is further adapted to register the sigmsr 2 semaphore in the target resident process.
In an embodiment of the invention, the adding module 310 is further adapted to add a specific identified receipt marker at a process start position of the target resident process.
The embodiment of the invention also provides another device for killing the resident process, and fig. 4 is a schematic structural diagram of the device for killing the resident process according to one embodiment of the invention. Referring to fig. 4, an apparatus 300 for killing resident processes includes at least an adding module 310, a detecting module 320, a process killing module 330, an executing module 340, a defining module 350, and a registering module 360.
And the execution module 340 is coupled to the detection module 320, and is adapted to continue to execute the corresponding task by using the target resident process if the receiving mark is not detected to be added to the designated position of the target resident process after the task in the target resident process is executed.
A definition module 350, coupled to the addition module 310, adapted to define a specific identification for identifying a killing target resident process;
the registration module 360 is coupled to the adding module 310, and is adapted to register the custom semaphore and the corresponding processing function in the target resident process, the processing function is used for analyzing the custom semaphore, and add the receiving tag at the designated location of the target resident process after analyzing that the custom semaphore carries the specific identifier.
Still another device for killing a resident process is provided in an embodiment of the present invention, and referring to fig. 5, the device 300 for killing a resident process may further include a start module 370 in addition to the above modules.
A start module 370, coupled to the process killing module 330, is adapted to start a new resident process after the process killing module 330 performs a killing operation on the target resident process, and to replace the target resident process with the new resident process to perform tasks.
According to yet another aspect of the present invention there is also provided a computer storage medium having stored thereon computer program code which, when run on a computing device, causes the computing device to perform the method of killing a resident process of any of the above.
According to yet another aspect of the present invention, there is also provided a computing device including: a processor; a memory storing computer program code; the computer program code, when executed by a processor, causes a computing device to perform the method of killing a resident process of any of the above.
According to any one of the above preferred embodiments or a combination of the preferred embodiments, the following advantageous effects can be achieved according to the embodiments of the present invention:
in the embodiment of the invention, after the target resident process receives the self-defined signal carrying the specific identifier, a receiving mark for indicating that the specific identifier is received is added at the designated position of the target resident process, after the task in the target resident process is executed, whether the designated position of the target resident process is added with the receiving mark is detected, if the designated position of the target resident process is added with the receiving mark, the signal carrying the specific identifier is received, and the specific identifier is used for identifying and killing the target resident process, so that the killing operation can be executed on the target resident process. Therefore, in the embodiment of the invention, by adding the receiving mark for indicating whether the signal carrying the specific mark is received or not at the designated position of the target resident process, the resident process can not be killed immediately after receiving the self-defined signal carrying the specific mark, but the resident process is killed after the script is executed, so that the problem of script interruption in execution caused by the fact that the process is immediately exited can be effectively avoided. Furthermore, the scheme can also effectively ensure that the script related items iterate orderly.
It will be clear to those skilled in the art that the specific working procedures of the above-described systems, devices and units may refer to the corresponding procedures in the foregoing method embodiments, and are not repeated herein for brevity.
In addition, each functional unit in the embodiments of the present invention may be physically independent, two or more functional units may be integrated together, or all functional units may be integrated in one processing unit. The integrated functional units may be implemented in hardware or in software or firmware.
Those of ordinary skill in the art will appreciate that: the integrated functional units, if implemented in software and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or in whole or in part in the form of a software product stored in a storage medium, comprising instructions for causing a computing device (e.g., a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present invention when the instructions are executed. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, etc.
Alternatively, all or part of the steps of implementing the foregoing method embodiments may be implemented by hardware (such as a personal computer, a server, or a computing device such as a network device) associated with program instructions, where the program instructions may be stored on a computer-readable storage medium, and where the program instructions, when executed by a processor of the computing device, perform all or part of the steps of the method according to the embodiments of the present invention.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all technical features thereof can be replaced by others within the spirit and principle of the present invention; such modifications and substitutions do not depart from the scope of the invention.
Claims (16)
1. A method of killing a resident process, comprising:
after receiving a self-defining signal carrying a specific identifier, adding a receiving mark for indicating that the specific identifier is received at a designated position of a target resident process, wherein the specific identifier is used for identifying and killing the target resident process, and the designated position comprises a process starting position or a process ending position;
when the task in the target resident process is executed, detecting whether the receiving mark is added at the appointed position of the target resident process;
if yes, executing killing operation on the target resident process;
before receiving the custom signal carrying the specific identifier, the method further comprises:
and registering the custom semaphore and a corresponding processing function in the target resident process, wherein the processing function is used for executing corresponding analysis and processing operations after the target resident process receives the custom semaphore subsequently.
2. The method of claim 1, wherein,
when the task in the target resident process is executed, if the receiving mark is not detected to be added in the appointed position of the target resident process, the corresponding task is executed by the target resident process continuously.
3. The method of claim 1 or 2, wherein the resident process comprises a resident process executing a PHP script.
4. The method according to claim 1 or 2, further comprising:
defining a specific identifier for identifying the process killing the target resident process;
registering the custom semaphore and a corresponding processing function in the target resident process, wherein the processing function is used for analyzing the custom signal, and adding the receiving mark at a designated position of the target resident process after analyzing that the custom signal carries the specific identifier.
5. The method of claim 4, wherein registering the custom semaphore in the target resident process comprises:
registering a sigusar 2 semaphore in the target resident process.
6. The method of claim 1 or 2, wherein adding a specific identified receipt marker at a specified location of the target resident process comprises:
and adding the receiving mark of the specific identification at the process starting position of the target resident process.
7. The method of claim 1 or 2, wherein after performing a kill operation on the target resident process, further comprising:
and starting a new resident process, and executing tasks by using the new resident process to replace the target resident process.
8. An apparatus for killing a resident process, comprising:
the adding module is suitable for adding a receiving mark for indicating that the specific mark is received to a designated position of a target resident process after receiving a self-defined signal carrying the specific mark, wherein the specific mark is used for marking and killing the target resident process, and the designated position comprises a process starting position or a process ending position;
the detection module is suitable for detecting whether the receiving mark is added at the appointed position of the target resident process or not when the task in the target resident process is executed;
the process killing module is suitable for executing killing operation on the target resident process when the detection module detects that the receiving mark is added to the designated position of the target resident process;
the registration module is suitable for registering the custom semaphore and the corresponding processing function in the target resident process, and the processing function is used for executing corresponding analysis and processing operations after the target resident process receives the custom semaphore at the subsequent time.
9. The apparatus of claim 8, further comprising:
and the execution module is suitable for continuing to execute the corresponding task by using the target resident process if the receiving mark is not detected to be added at the designated position of the target resident process when the task in the target resident process is executed.
10. The apparatus of claim 8 or 9, wherein the resident process comprises a resident process executing a PHP script.
11. The apparatus of claim 8 or 9, further comprising:
a definition module adapted to define a specific identification for identifying the process killing the target resident;
the registration module is suitable for registering the custom semaphore and a corresponding processing function in the target resident process, wherein the processing function is used for analyzing the custom semaphore, and adding the receiving mark at the appointed position of the target resident process after analyzing that the custom semaphore carries the specific mark.
12. The apparatus of claim 11, wherein the registration module is further adapted to:
registering a sigusar 2 semaphore in the target resident process.
13. The apparatus of claim 8 or 9, wherein the adding module is further adapted to:
and adding the receiving mark of the specific identification at the process starting position of the target resident process.
14. The apparatus of claim 8 or 9, further comprising:
and the starting module is suitable for starting a new resident process after the process killing module executes killing operation on the target resident process, and executing tasks by using the new resident process to replace the target resident process.
15. A computer storage medium storing computer program code which, when run on a computing device, causes the computing device to perform the method of killing a resident process of any one of claims 1-7.
16. A computing device, comprising: a processor; a memory storing computer program code; the computer program code, when executed by the processor, causes the computing device to perform the method of killing a resident process of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811028165.4A CN110928596B (en) | 2018-09-04 | 2018-09-04 | Method and device for killing resident process |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811028165.4A CN110928596B (en) | 2018-09-04 | 2018-09-04 | Method and device for killing resident process |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110928596A CN110928596A (en) | 2020-03-27 |
CN110928596B true CN110928596B (en) | 2024-02-06 |
Family
ID=69855746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811028165.4A Active CN110928596B (en) | 2018-09-04 | 2018-09-04 | Method and device for killing resident process |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110928596B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0944376A (en) * | 1995-07-27 | 1997-02-14 | Nec Software Ltd | Process state management system |
CN101226487A (en) * | 2008-01-30 | 2008-07-23 | 中国船舶重工集团公司第七〇九研究所 | Method for implementing inner core level thread library based on built-in Linux operating system |
CN103455380A (en) * | 2012-06-05 | 2013-12-18 | 上海斐讯数据通信技术有限公司 | Multi-process communication system and establishment and communication method thereof |
CN105843675A (en) * | 2016-04-01 | 2016-08-10 | 腾讯科技(深圳)有限公司 | Thread exiting method and device |
CN106648704A (en) * | 2017-01-05 | 2017-05-10 | 广东欧珀移动通信有限公司 | Process management method and device and mobile terminal |
-
2018
- 2018-09-04 CN CN201811028165.4A patent/CN110928596B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0944376A (en) * | 1995-07-27 | 1997-02-14 | Nec Software Ltd | Process state management system |
CN101226487A (en) * | 2008-01-30 | 2008-07-23 | 中国船舶重工集团公司第七〇九研究所 | Method for implementing inner core level thread library based on built-in Linux operating system |
CN103455380A (en) * | 2012-06-05 | 2013-12-18 | 上海斐讯数据通信技术有限公司 | Multi-process communication system and establishment and communication method thereof |
CN105843675A (en) * | 2016-04-01 | 2016-08-10 | 腾讯科技(深圳)有限公司 | Thread exiting method and device |
CN106648704A (en) * | 2017-01-05 | 2017-05-10 | 广东欧珀移动通信有限公司 | Process management method and device and mobile terminal |
Non-Patent Citations (3)
Title |
---|
UNIX系统中常驻进程的一个应用实例;张伟 等;《计算机技术与发展》;19990531;50-52 * |
于红 等.计算机操作系统.《计算机操作系统》.2017, * |
王铁军 等.Linux编程实战.2017,42-45. * |
Also Published As
Publication number | Publication date |
---|---|
CN110928596A (en) | 2020-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108665297B (en) | Method and device for detecting abnormal access behavior, electronic equipment and storage medium | |
CN110991171B (en) | Sensitive word detection method and device | |
US10749927B2 (en) | Webpage loading method, apparatus and system | |
CN106815031B (en) | Kernel module loading method and device | |
JP2013533527A5 (en) | ||
CN109582833B (en) | Abnormal text detection method and device | |
KR920001321A (en) | Method and apparatus for processing branch in high speed processor | |
CN112073393B (en) | Flow detection method based on cloud computing and user behavior analysis | |
CN107835228B (en) | Instruction processing method and device based on dynamic generalized routing | |
CN106681901B (en) | method and device for generating test sample | |
CN108881150B (en) | Detection task processing method and device, electronic equipment and storage medium | |
WO2018069950A1 (en) | Method, system, and program for analyzing logs | |
CN110928596B (en) | Method and device for killing resident process | |
CN113821692A (en) | Data processing method, device, server and storage medium | |
CN105488399A (en) | Script virus detection method and system based on program keyword calling sequence | |
CN109558548B (en) | Method for eliminating CSS style redundancy and related product | |
KR101996358B1 (en) | Method and apparatus for providing api call information for dynamic analysis of web application | |
CN101271408A (en) | Method for analyzing stack use in embedded system | |
US20180191809A1 (en) | Information publishing method, device and server | |
CN110210215B (en) | Virus detection method and related device | |
CN114900492B (en) | Abnormal mail detection method, device and system and computer readable storage medium | |
CN111240790A (en) | Multi-language adaptation method and device for application, client and storage medium | |
CN114780402A (en) | Debugging method and device of chip simulation system and server | |
CN110990558B (en) | Electronic book content display method, computing equipment and computer storage medium | |
CN113721960A (en) | Application program bug fixing method and device based on RPA and AI |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20240114 Address after: Room 03, 2nd Floor, Building A, No. 20 Haitai Avenue, Huayuan Industrial Zone (Huanwai), Binhai New Area, Tianjin, 300450 Applicant after: 3600 Technology Group Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |