Mercurial > forge
annotate main/database/src/__pq_internal_exit__.cc @ 12720:52ca082757c2 octave-forge tip
Update copyright notices.
author | i7tiol |
---|---|
date | Sat, 27 Feb 2016 11:21:29 +0000 |
parents | 9cb56e0cd09b |
children |
rev | line source |
---|---|
12720 | 1 // Copyright (C) 2008-2016 Olaf Till <olaf.till@uni-jena.de> |
12097
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
2 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
3 // This program is free software; you can redistribute it and/or modify |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
4 // it under the terms of the GNU General Public License as published by |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
5 // the Free Software Foundation; either version 3 of the License, or |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
6 // (at your option) any later version. |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
7 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
8 // This program is distributed in the hope that it will be useful, |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
11 // GNU General Public License for more details. |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
12 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
13 // You should have received a copy of the GNU General Public License |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
14 // along with this program; if not, write to the Free Software |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
16 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
17 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
18 #include <octave/oct.h> |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
19 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
20 #include <unistd.h> |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
21 #include <signal.h> |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
22 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
23 // PKG_ADD: autoload ("__pq_internal_exit__", "pq_interface.oct"); |
12613 | 24 // PKG_DEL: autoload ("__pq_internal_exit__", "pq_interface.oct", "remove"); |
12097
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
25 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
26 // This function duplicates __exit__.cc to avoid the dependency on the |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
27 // package main/general. |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
28 |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
29 DEFUN_DLD (__pq_internal_exit__, args, , |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
30 "-*- texinfo -*-\n\ |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
31 @deftypefn {Loadable Function} __pq_internal_exit__ (status)\n\ |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
32 This is a wrapper over the POSIX _exit() system call. Calling this function\n\ |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
33 will terminate the running process immediatelly, bypassing normal Octave\n\ |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
34 terminating sequence. It is suitable to terminate a forked process. It\n\ |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
35 should be considered expert-only and not to be used in normal code.\n\ |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
36 @end deftypefn") |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
37 { |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
38 _exit (args.length () > 0 ? args(0).int_value () : 0); |
b9544a96bc8d
support viewing large objects with viewers needing a temporary file
i7tiol
parents:
diff
changeset
|
39 } |