projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.9.10: make tests clean up after themselves a bit better
[sbcl.git]
/
src
/
runtime
/
monitor.c
diff --git
a/src/runtime/monitor.c
b/src/runtime/monitor.c
index
69d0380
..
076d948
100644
(file)
--- a/
src/runtime/monitor.c
+++ b/
src/runtime/monitor.c
@@
-9,16
+9,19
@@
* files for more information.
*/
* files for more information.
*/
+#include "sbcl.h"
+
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <setjmp.h>
#include <sys/time.h>
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <setjmp.h>
#include <sys/time.h>
+#ifndef LISP_FEATURE_WIN32
#include <sys/resource.h>
#include <sys/resource.h>
+#endif
#include <signal.h>
#include <unistd.h>
#include <signal.h>
#include <unistd.h>
-#include "sbcl.h"
#include "runtime.h"
#include "parse.h"
#include "vars.h"
#include "runtime.h"
#include "parse.h"
#include "vars.h"
@@
-177,7
+180,9
@@
print_cmd(char **ptr)
static void
kill_cmd(char **ptr)
{
static void
kill_cmd(char **ptr)
{
+#ifndef LISP_FEATURE_WIN32
kill(getpid(), parse_number(ptr));
kill(getpid(), parse_number(ptr));
+#endif
}
static void
}
static void
@@
-444,7
+449,11
@@
sub_monitor(void)
int ambig;
if (!ldb_in) {
int ambig;
if (!ldb_in) {
+#ifndef LISP_FEATURE_WIN32
ldb_in = fopen("/dev/tty","r+");
ldb_in = fopen("/dev/tty","r+");
+#else
+ ldb_in = stdin;
+#endif
ldb_in_fd = fileno(ldb_in);
}
ldb_in_fd = fileno(ldb_in);
}
@@
-453,14
+462,7
@@
sub_monitor(void)
fflush(stdout);
line = fgets(buf, sizeof(buf), ldb_in);
if (line == NULL) {
fflush(stdout);
line = fgets(buf, sizeof(buf), ldb_in);
if (line == NULL) {
- if (isatty(ldb_in_fd)) {
- putchar('\n');
- continue;
- }
- else {
- fprintf(stderr, "\nEOF on something other than a tty.\n");
- exit(0);
- }
+ exit(1);
}
ptr = line;
if ((token = parse_token(&ptr)) == NULL)
}
ptr = line;
if ((token = parse_token(&ptr)) == NULL)