Remove `<*argument>` from docs (#771)

pull/784/head
Next Turn 2021-01-02 12:51:06 +08:00 committed by GitHub
parent ad5f78b3c5
commit 2edcee7f49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 12 deletions

View File

@ -94,33 +94,27 @@ See the [Logging and error reporting](loggingAndErrorReporting.md) page for more
### Arguments
`<argument>` element specifies the arguments to be passed to the executable.
Winsw will quote each argument if necessary, so do not put quotes in `<argument>` to avoid double quotation.
`<arguments>` element specifies the arguments to be passed to the executable.
```xml
<argument>arg1</argument>
<argument>arg2</argument>
<argument>arg3</argument>
<arguments>arg1 arg2 arg3</arguments>
```
`<arguments>` element can be used instead to specify the whole command line in a single element.
### stopargument/stopexecutable
~~When the service is requested to stop, winsw simply calls [TerminateProcess function](https://docs.microsoft.com/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) to kill the service instantly.~~
However, if `<stopargument>`/`<stoparguments>` elements are present, winsw will instead launch another process of `<executable>` (or `<stopexecutable>` if that's specified) with the specified arguments, and expects that to initiate the graceful shutdown of the service process.
However, if `<stoparguments>` element is present, winsw will instead launch another process of `<executable>` (or `<stopexecutable>` if that's specified) with the specified arguments, and expects that to initiate the graceful shutdown of the service process.
Winsw will then wait for the two processes to exit on its own, before reporting back to Windows that the service has terminated.
When you use the `<stopargument>`/`<stoparguments>`, you must use `<startargument>`/`<startarguments>` instead of `<argument>`. See the complete example below:
When you use the `<stoparguments>`, you must use `<startarguments>` instead of `<arguments>`. See the complete example below:
```xml
<executable>catalina.sh</executable>
<startargument>jpda</startargument>
<startargument>run</startargument>
<startarguments>jpda run</startarguments>
<stopexecutable>catalina.sh</stopexecutable>
<stopargument>stop</stopargument>
<stoparguments>stop</stoparguments>
```
### stoptimeout