diff options
author | Alain Magloire | 2004-11-17 02:48:13 +0000 |
---|---|---|
committer | Alain Magloire | 2004-11-17 02:48:13 +0000 |
commit | f1002fe6a375065c39fda2370103c34beceb13bd (patch) | |
tree | 82e1772b60ee92985aabad745f7f4e6b0e323f33 /core/org.eclipse.cdt.core.solaris | |
parent | 522cf10a811821e87b30425de7be055e90480328 (diff) | |
download | org.eclipse.cdt-f1002fe6a375065c39fda2370103c34beceb13bd.tar.gz org.eclipse.cdt-f1002fe6a375065c39fda2370103c34beceb13bd.tar.xz org.eclipse.cdt-f1002fe6a375065c39fda2370103c34beceb13bd.zip |
regenerate the sharedlibraries binaries.
Diffstat (limited to 'core/org.eclipse.cdt.core.solaris')
-rw-r--r-- | core/org.eclipse.cdt.core.solaris/library/exec_pty.c | 20 | ||||
-rw-r--r-- | core/org.eclipse.cdt.core.solaris/library/exec_unix.c | 2 | ||||
-rw-r--r-- | core/org.eclipse.cdt.core.solaris/library/openpty.c | 3 | ||||
-rw-r--r-- | core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so | bin | 9681 -> 9937 bytes | |||
-rw-r--r-- | core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so | bin | 14902 -> 19773 bytes |
5 files changed, 16 insertions, 9 deletions
diff --git a/core/org.eclipse.cdt.core.solaris/library/exec_pty.c b/core/org.eclipse.cdt.core.solaris/library/exec_pty.c index d012cfb051c..f2a9996582a 100644 --- a/core/org.eclipse.cdt.core.solaris/library/exec_pty.c +++ b/core/org.eclipse.cdt.core.solaris/library/exec_pty.c @@ -7,6 +7,8 @@ #include <libgen.h>
#include <stdlib.h>
#include <termios.h>
+#include <stropts.h>
+#include <sys/ioctl.h>
/* from pfind.c */
extern char *pfind(const char *name);
@@ -71,7 +73,7 @@ exec_pty(const char *path, char *const argv[], char *const envp[], dup2(fds, STDIN_FILENO); /* dup stdin */
dup2(fds, STDOUT_FILENO); /* dup stdout */
dup2(pipe2[1], STDERR_FILENO); /* dup stderr */
- close(fds); /* done with fds. */
+ close(fds); /* done with fds. */
}
/* Close all the fd's in the child */
@@ -93,6 +95,7 @@ exec_pty(const char *path, char *const argv[], char *const envp[], } else if (childpid != 0) { /* parent */
+ ioctl(fdm, I_PUSH, "ptem");
set_noecho(fdm);
if (channels != NULL) {
/* close the write end of pipe1 */
@@ -127,14 +130,21 @@ int main(int argc, char **argv, char **envp) { fdm = ptym_open(pts_name);
status = exec_pty(path, argv, envp, ".", channels, pts_name, fdm);
if (status >= 0) {
- app_stdin = fdopen(channels[0], "w");
+ //app_stdin = fdopen(channels[0], "w");
app_stdout = fdopen(channels[1], "r");
app_stderr = fdopen(channels[2], "r");
- if (app_stdout == NULL || app_stderr == NULL || app_stdin == NULL) {
+ if (app_stdout == NULL || app_stderr == NULL /*|| app_stdin == NULL*/) {
fprintf(stderr, "PROBLEMS\n");
} else {
- fputs("foo\n", app_stdin);
- fputs("bar\n", app_stdin);
+ printf("PID %d\n", status);
+ if (isatty(fdm)) {
+ printf("Is atty\n");
+ }
+ write(fdm, "foo\n", 4);
+ write(fdm, "bar\n", 4);
+ //fputs("foo\n", app_stdin);
+ //fputs("bar\n", app_stdin);
+ //fflush(app_stdin);
while(fgets(buffer, sizeof buffer, app_stdout) != NULL) {
fprintf(stdout, "STDOUT: %s\n", buffer);
}
diff --git a/core/org.eclipse.cdt.core.solaris/library/exec_unix.c b/core/org.eclipse.cdt.core.solaris/library/exec_unix.c index 3c3db7926b0..9e4ef1b274f 100644 --- a/core/org.eclipse.cdt.core.solaris/library/exec_unix.c +++ b/core/org.eclipse.cdt.core.solaris/library/exec_unix.c @@ -90,8 +90,6 @@ exec0(const char *path, char *const argv[], char *const envp[], } else if (childpid != 0) { /* parent */ - char b; - if (channels != NULL) { /* close the read end of pipe1 */ if (close(pipe0[0]) == -1) diff --git a/core/org.eclipse.cdt.core.solaris/library/openpty.c b/core/org.eclipse.cdt.core.solaris/library/openpty.c index 8fe4fe260af..3d8e822776c 100644 --- a/core/org.eclipse.cdt.core.solaris/library/openpty.c +++ b/core/org.eclipse.cdt.core.solaris/library/openpty.c @@ -62,8 +62,6 @@ ptym_open(char * pts_name) fdm = open(pts_name, O_RDWR); if (fdm < 0) return -1; - if (fdm < 0) - return -1; if (grantpt(fdm) < 0) { /* grant access to slave */ close(fdm); return -2; @@ -91,6 +89,7 @@ ptys_open(int fdm, char * pts_name) close(fdm); return -5; } + if (ioctl(fds, I_PUSH, "ptem") < 0) { printf("pterm:%s\n", strerror(errno)); close(fdm); diff --git a/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so b/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so Binary files differindex 33ba3c70d63..a5d848d0c57 100644 --- a/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so +++ b/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libpty.so diff --git a/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so b/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so Binary files differindex 70f2acab3c1..2d9da5cc8d3 100644 --- a/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so +++ b/core/org.eclipse.cdt.core.solaris/os/solaris/sparc/libspawner.so |