commons-daemon-1.1.0-native-src/LICENSE.txt0100664 0001750 0001750 00000026136 10210071042 020625 0ustar00markmark0000000 0000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. commons-daemon-1.1.0-native-src/RELEASE-NOTES.txt0100664 0001750 0001750 00000003522 13201062030 021503 0ustar00markmark0000000 0000000 ================================================================================ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================ Apache Commons Daemon 1.1 Release Notes This document contains the release notes for this version of the Apache Commons Daemon package, and highlights new features compared to the 1.0 releases. New Features ------------ - The minimum required Java version has been increased from Java 1.3 to Java 6 - Explicit support has been added for Java 9 - The minimum target platform for Windows has been increased to Windows XP Bug Fixes --------- - Please see the change log http://commons.apache.org/proper/commons-daemon/changes-report.html Feedback -------- Open source works best when you give feedback: http://commons.apache.org/daemon/ Please direct all bug reports to JIRA https://issues.apache.org/jira/browse/DAEMON Or subscribe to the commons-user mailing list (prefix emails by [daemon]) http://commons.apache.org/mail-lists.html The Apache Commons Daemon Team commons-daemon-1.1.0-native-src/NOTICE.txt0100664 0001750 0001750 00000000257 13130042551 020527 0ustar00markmark0000000 0000000 Apache Commons Daemon Copyright 1999-2017 The Apache Software Foundation This product includes software developed by The Apache Software Foundation (http://www.apache.org/). commons-daemon-1.1.0-native-src/README0100664 0001750 0001750 00000000427 11663511062 017673 0ustar00markmark0000000 0000000 Apache Commons Daemon ===================== Apache Commons Daemon is a set of utilities and Java support classes for running Java applications as server processes. Commonly known as 'daemon' processes in Unix terminology (hence the name), on Windows they are called 'services'. commons-daemon-1.1.0-native-src/unix/0040775 0001750 0001750 00000000000 13203026456 017776 5ustar00markmark0000000 0000000 commons-daemon-1.1.0-native-src/unix/man/0040775 0001750 0001750 00000000000 13203026365 020550 5ustar00markmark0000000 0000000 commons-daemon-1.1.0-native-src/unix/native/0040775 0001750 0001750 00000000000 13203026365 021263 5ustar00markmark0000000 0000000 commons-daemon-1.1.0-native-src/unix/support/0040775 0001750 0001750 00000000000 13203026365 021511 5ustar00markmark0000000 0000000 commons-daemon-1.1.0-native-src/unix/configure.in0100664 0001750 0001750 00000011761 13017110374 022306 0ustar00markmark0000000 0000000 dnl dnl Licensed to the Apache Software Foundation (ASF) under one or more dnl contributor license agreements. See the NOTICE file distributed with dnl this work for additional information regarding copyright ownership. dnl The ASF licenses this file to You under the Apache License, Version 2.0 dnl (the "License"); you may not use this file except in compliance with dnl the License. You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, software dnl distributed under the License is distributed on an "AS IS" BASIS, dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. dnl See the License for the specific language governing permissions and dnl limitations under the License. dnl dnl ------------------------------------------------------------------------- dnl Author Pier Fumagalli dnl Version $Id: configure.in 1771804 2016-11-28 20:18:04Z markt $ dnl ------------------------------------------------------------------------- dnl ------------------------------------------------------------------------- dnl Initialize AutoConf dnl ------------------------------------------------------------------------- AC_PREREQ(2.53) sinclude(./support/apfunctions.m4)dnl sinclude(./support/apjava.m4)dnl sinclude(./support/apsupport.m4)dnl AC_INIT(configure.in) AC_CONFIG_AUX_DIR(./support) dnl Generate ./config.nice for reproducing runs of configure dnl AP_CONFIG_NICE(config.nice) dnl ------------------------------------------------------------------------- dnl Check current host (forget about cross compilation) and validate it dnl against the cache (fail if the cache differs) dnl ------------------------------------------------------------------------- AP_MSG_HEADER([Current host]) AC_CANONICAL_HOST() AP_CANONICAL_HOST_CHECK() dnl ------------------------------------------------------------------------- dnl Check C environment dnl ------------------------------------------------------------------------- AP_MSG_HEADER([C-Language compilation tools]) AC_PROG_CC() AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) dnl ------------------------------------------------------------------------- dnl Check if this host is supported dnl ------------------------------------------------------------------------- AP_MSG_HEADER([Host support]) AP_SUPPORTED_HOST() if test "$supported_os" = "darwin" then if test -z "$JAVA_HOME" -a -x /usr/libexec/java_home then JAVA_HOME="`/usr/libexec/java_home 2>dev/null`" fi if test -z "$JAVA_HOME" -a -d /System/Library/Frameworks/JavaVM.framework/Home; then JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home fi _prevdir=`/bin/pwd` if test -n "$JAVA_HOME" -a -d "$JAVA_HOME/include"; then cd "$JAVA_HOME/include" elif test -n "$JAVA_HOME" -a -d "$JAVA_HOME/../Headers"; then cd "$JAVA_HOME/../Headers" else cd /System/Library/Frameworks/JavaVM.framework/Headers fi INCLUDES="$INCLUDES -I`/bin/pwd -P`" cd $_prevdir unset _prevdir fi dnl ------------------------------------------------------------------------- dnl Check JAVA environment dnl ------------------------------------------------------------------------- AP_MSG_HEADER([Java compilation tools]) AP_FIND_JAVA() dnl MAC OS X does not used include but Headers if test -d $JAVA_HOME/Headers then JAVA_INC=Headers else JAVA_INC=include fi AP_FIND_JAVA_OS() if test -z "${JAVA_OS}" then AC_MSG_RESULT([jni_md.h found in $JAVA_HOME/$JAVA_INC]) INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/$JAVA_INC" else INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os" fi dnl ------------------------------------------------------------------------- dnl Add gcc specific CFLAGS. dnl ------------------------------------------------------------------------- if test "$GCC" = "yes" then CFLAGS="$CFLAGS -Wall -Wstrict-prototypes" AC_MSG_RESULT([gcc flags added]) fi dnl ------------------------------------------------------------------------- dnl Add gcc specific CFLAGS. dnl ------------------------------------------------------------------------- if test -z "$LDCMD" then LDCMD="$CC" fi AC_SUBST(LDCMD) if test "$supported_os" = "linux" then AC_CHECK_HEADER([sys/capability.h], [CFLAGS="$CFLAGS -DHAVE_LIBCAP"], AC_MSG_WARN([cannot find headers for libcap])) fi if test -z "$STRIPFLAGS" then STRIP="@: " else STRIP="$STRIP $STRIPFLAGS" fi AC_SUBST(INCLUDES) dnl ------------------------------------------------------------------------- dnl Random programs we need to compile locally dnl ------------------------------------------------------------------------- AP_MSG_HEADER([Writing output files]) AC_OUTPUT(Makefile Makedefs native/Makefile) dnl ------------------------------------------------------------------------- dnl Done dnl ------------------------------------------------------------------------- AP_MSG_HEADER([All done]) AC_MSG_RESULT([Now you can issue "make"]) commons-daemon-1.1.0-native-src/unix/INSTALL.txt0100664 0001750 0001750 00000005052 13017110374 021640 0ustar00markmark0000000 0000000 To build the service libraries and binary under an UNIX operating system you will need: An ANSI-C compliant compiler (GCC is good) A Java Platform 2 compliant SDK GNU AutoConf (when building from SVN). When building from SVN sources you need to build the "configure" program with: sh support/buildconf.sh (Note it is possible to replace sh by any compatible shell like bash, ksh). Once the configure script is generated, run it (remember to specify either the --with-java= parameter or set the JAVA_HOME environment to point to your JDK installation. For example: ./configure --with-java=/usr/java or JAVA_HOME=/usr/java export JAVA_HOME ./configure Note: On Mac OS X is /System/Library/Frameworks/JavaVM.framework/Home. Depending on your JDK layout, configure might fail to find the JNI machine dependant include file (jni_md.h). If that's the case use the --with-os-type= parameter where subdir points to the directory within JDK include directory containing jni_md.h file. If your operating system is supported, configure will go thru cleanly, otherwise it will report an error (please send us the details of your OS/JDK, or a patch against the sources). To build the binaries and libraries simply do: make This will generate the file: ./jsvc. It should be straightforward from here on. To check the allowed parameters for the jsvc binary simply do ./native/jsvc -help Note: On Linux the module capabilities should be loaded, when using -user root make sure you REALLY understand what capabilities does (for example for files access: the downgraded root may not be able to read some files!). Making 64-bit binaries To be able to build the 64-binaries for supported platforms enter the specific parameters before calling configure export CFLAGS=-m64 export LDFLAGS=-m64 ./configure make Making Universal binaries Some platforms like Mac OSX allow universal or fat binaries that allow both 32 and 64 binaries inside the same executable. To be able to build the fat binaries enter the specific parameters before calling configure export CFLAGS="-arch i386 -arch x86_64" export LDFLAGS="-arch i386 -arch x86_64" ./configure make Optional Build flags Make process allows specifying additional compilation flags at compile time by using EXTRA_CFLAGS and EXTRA_LDFLAGS either as environment variables or defined along the make command line make EXTRA_CFLAGS="-march=i586" will cause -march=i586 to be added to the configure generated CFLAGS. The same applies to EXTRA_LDFLAGS which will be added at link stage. commons-daemon-1.1.0-native-src/unix/man/jsvc.1.xml0100664 0001750 0001750 00000020656 13203026051 022374 0ustar00markmark0000000 0000000 JSVC 1 15 Nov 2017 Jsvc version 1.1.0 Apache Commons Daemon project jsvc application to launch java daemon jsvc -jvm JVM name -client client JVM -server server JVM -classpath path -cp path -java-home directory -version -help -? -nodetach -debug -check -user user -wait waittime -restarts max restart count -umask mask -stop -verbose:class|gc|jni -outfile /full/path/to/file -errfile /full/path/to/file -pidfile /full/path/to/file -Dproperty=value -Xoption DESCRIPTION jsvc executes classfile that implements a Daemon interface. OPTIONS JVM name use a specific Java Virtual Machine. client JVM use a client Java Virtual Machine. server JVM use a server Java Virtual Machine. directory and zip/jar files set search path for service classes and resouces directory set the path of your JDK or JRE installation (or set the JAVA_HOME environment variable) show the current Java environment version (to check correctness of -home and -jvm. Implies -nodetach) show this help page (implies -nodetach) don't detach from parent process and become a daemon verbosely print debugging information only check service (implies -nodetach) stop the service using the file given in the -pidfile option waittime wait up to waittime seconds for the service to start waittime should multiple of 10 (min=10) max restart count maximum automatic restart count -1=infinite (default), 0=none, 1..(INT_MAX-1)=fixed count mask sets the file mode creation mask user user used to run the daemon (defaults to current user) enable verbose output /full/path/to/file Location for output from stdout (defaults to /dev/null). Use the value '&2' to simulate '1>&2', or 'SYSLOG' to send output to the system log. /full/path/to/file Location for output from stderr (defaults to /dev/null). Use the value '&1' to simulate '2>&1', or 'SYSLOG' to send output to the system log. /full/path/to/file Location for output from the file containing the pid of jsvc (defaults to /var/run/jsvc.pid) <name>=<value> set a Java system property <option> set Virtual Machine specific option AUTHOR JSVC is part of the Apache Commons Daemon project. Authors are Jean-Frederic Clere, Remy Maucherat, Yoav Shapira, Bill Barker, Mladen Turk. JSVC is released under the Apache License Version 2.0. commons-daemon-1.1.0-native-src/unix/man/README0100664 0001750 0001750 00000001175 11511404362 021426 0ustar00markmark0000000 0000000 To build it use: docbook2man jsvc.1.xml If your docbook2man uses xalan and you are behind a firewall Modify jsvc.1.xml as below: +++ Index: jsvc.1.xml =================================================================== --- jsvc.1.xml (revision 170004) +++ jsvc.1.xml (working copy) @@ -1,6 +1,6 @@ + "docbookx.dtd"> JSVC +++ Use fetch.sh to get docbook files. commons-daemon-1.1.0-native-src/unix/native/debug.c0100664 0001750 0001750 00000004577 13130043172 022521 0ustar00markmark0000000 0000000 /* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "jsvc.h" #include #include #include /* Wether debug is enabled or not */ bool log_debug_flag = false; /* Wether SYSLOG logging (for stderr) is enable or not. */ bool log_stderr_syslog_flag = false; /* Wether SYSLOG logging (for stdout) is enable or not. */ bool log_stdout_syslog_flag = false; /* The name of the jsvc binary. */ char *log_prog = "jsvc"; /* Dump a debug trace message to stderr */ void log_debug(const char *fmt, ...) { va_list ap; time_t now; struct tm *nowtm; char buff[80]; if (log_debug_flag == false) return; if (fmt == NULL) return; now = time(NULL); nowtm = localtime(&now); strftime(buff, sizeof(buff), "%Y-%m-%d %T", nowtm); va_start(ap, fmt); if (log_stderr_syslog_flag) fprintf(stderr, "%s %d %s debug: ", buff, getpid(), log_prog); #if defined(DEBUG) || defined(_DEBUG) else fprintf(stderr, "[debug] %s %d ", buff, getpid()); #endif vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); fflush(stderr); va_end(ap); } /* Dump an error message to stderr */ void log_error(const char *fmt, ...) { va_list ap; time_t now; struct tm *nowtm; char buff[80]; if (fmt == NULL) return; va_start(ap, fmt); if (log_stderr_syslog_flag) { now = time(NULL); nowtm = localtime(&now); strftime(buff, sizeof(buff), "%Y-%m-%d %T", nowtm); fprintf(stderr, "%s %d %s error: ", buff, getpid(), log_prog); } vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); fflush(stderr); va_end(ap); } commons-daemon-1.1.0-native-src/unix/native/.indent.pro0100664 0001750 0001750 00000000157 11346135062 023345 0ustar00markmark0000000 0000000 -i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1 -nut -ncs -Tbool -Targ_data -Thome_data -Thome_jvm -Tdso_handle commons-daemon-1.1.0-native-src/unix/native/locks.h0100664 0001750 0001750 00000002643 13130043172 022543 0ustar00markmark0000000 0000000 /* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __JSVC_LOCKS_H__ #define __JSVC_LOCKS_H__ /* * as Cygwin does not support locks, jsvc use NT API to emulate them. */ #ifdef OS_CYGWIN #define F_ULOCK 0 /* Unlock a previously locked region */ #define F_LOCK 1 /* Lock a region for exclusive use */ /* * allow a file to be locked * @param fildes an open file descriptor * @param function a control value that specifies the action to be taken * @param size number of bytes to lock * @return Zero on success, a value less than 0 if an error was encountered */ int lockf(int fildes, int function, off_t size); #endif #endif /* __JSVC_LOCKS_H__ */ commons-daemon-1.1.0-native-src/unix/native/help.c0100664 0001750 0001750 00000014733 13203026001 022347 0ustar00markmark0000000 0000000 /* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "jsvc.h" void help(home_data *data) { int x; printf("Usage: %s [-options] class [args...]\n", log_prog); printf("\n"); printf("Where options include:\n"); printf("\n"); printf(" -help | --help | -?\n"); printf(" show this help page (implies -nodetach)\n"); printf(" -jvm \n"); printf(" use a specific Java Virtual Machine. Available JVMs:\n"); printf(" "); for (x = 0; x < data->jnum; x++) { printf(" '%s'", PRINT_NULL(data->jvms[x]->name)); } printf("\n"); printf(" -client\n"); printf(" use a client Java Virtual Machine.\n"); printf(" -server\n"); printf(" use a server Java Virtual Machine.\n"); printf(" -cp | -classpath \n"); printf(" set search path for service classes and resouces\n"); printf(" -java-home | -home \n"); printf(" set the path of your JDK or JRE installation (or set\n"); printf(" the JAVA_HOME environment variable)\n"); printf(" -version\n"); printf(" show the current Java environment version (to check\n"); printf(" correctness of -home and -jvm. Implies -nodetach)\n"); printf(" -showversion\n"); printf(" show the current Java environment version (to check\n"); printf(" correctness of -home and -jvm) and continue execution.\n"); printf(" -nodetach\n"); printf(" don't detach from parent process and become a daemon\n"); printf(" -debug\n"); printf(" verbosely print debugging information\n"); printf(" -check\n"); printf(" only check service (implies -nodetach)\n"); printf(" -user \n"); printf(" user used to run the daemon (defaults to current user)\n"); printf(" -verbose[:class|gc|jni]\n"); printf(" enable verbose output\n"); printf(" -cwd \n"); printf(" set working directory to given location (defaults to /)\n"); printf(" -outfile \n"); printf(" Location for output from stdout (defaults to /dev/null)\n"); printf(" Use the value '&2' to simulate '1>&2'\n"); printf(" -errfile \n"); printf(" Location for output from stderr (defaults to /dev/null)\n"); printf(" Use the value '&1' to simulate '2>&1'\n"); printf(" -pidfile \n"); printf(" Location for output from the file containing the pid of jsvc\n"); printf(" (defaults to /var/run/jsvc.pid)\n"); printf(" -D=\n"); printf(" set a Java system property\n"); printf(" -X