Sponsored Content
Full Discussion: Create a pipe to /dev/tty
Top Forums Programming Create a pipe to /dev/tty Post 302470576 by edgarvm on Wednesday 10th of November 2010 11:45:59 AM
Old 11-10-2010
hi Corona688:

Sadly the account which I'm trying to connect to doesn't have access for ssh, and probably sudo won't be available in other locations where the application is going to be installed.

Thanks for your response
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cannot open "/dev/tty"

Hi, When it proccesing the backup with cpio report this message: Cannot open "/dev/tty" and cancel de backup. Cuando se procesa la tarea del backup reporta el error: Cannot open "/dev/tty" y cancela el backup y no termina correctamente, a que se devera esta advertencia. Gracias. Thacks.... (3 Replies)
Discussion started by: cmr88
3 Replies

2. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

3. Programming

sniff /dev/tty

hello all, Being root, I would like to log user activity (also multiple root activity), i don't really like history file based logging, lets assume that users have access to their .profile. I would like to write a monitoring daemon in C that would capture /dev/ttys, so I need to do a... (0 Replies)
Discussion started by: wayward
0 Replies

4. SCO

Cannot create pipe

Hi, I'm new here, so please dont shoot me if I forgot something :) Some SCO box we've (our company) got recently from a new customer runs an app that hangs the entire box every once in a while. Today when an admin tried to start the db we got this error: $ dbstart dbstart: line 22: cannot... (6 Replies)
Discussion started by: necron
6 Replies

5. Programming

What happens on opening /dev/tty failure?

Since the existence of /dev/tty is not guaranteed, what happens when an attempt is made to open /dev/tty and there's no controlling terminal? Will it fail, or open /dev/null instead? Or do something else? So is checking for NULL in the code below a safe way of checking whether opening... (2 Replies)
Discussion started by: gencon
2 Replies

6. UNIX for Dummies Questions & Answers

read from terminal/keyboard > /dev/tty

Hi, I need to provide more than one character to "> /dev/tty" through terminal/keyboard input, I have this: ok=false while do echo " Enter r1 to reformat " > /dev/tty read choice case $choice in ) echo " bla bla bla " ;; done However, in this way,... (3 Replies)
Discussion started by: Gery
3 Replies

7. UNIX for Dummies Questions & Answers

/dev/tty find last modified time

what can I use to find the last modified time of a /dev/tty ? (4 Replies)
Discussion started by: l flipboi l
4 Replies

8. Solaris

Create sym-link into /dev (zone)

Hi i need to install a software into a zone, and this kind of software needs to have a file who is linked into /dev. But it is not possible to create a link into /dev nor create a file into it. -bash-3.00# ln -s /tmp/testfile /dev/ ln: cannot create /dev//testfile: Permission denied... (2 Replies)
Discussion started by: beta17
2 Replies

9. UNIX for Dummies Questions & Answers

Reading password from /dev/tty

hi, From the below script: ##########################################pwd_auth.sh######################################################################################## #Author: Pandeeswaran Bhoopathy #Written on:26th Jan 2012 2:00PM #This script describes the feature of stty and illustrates... (3 Replies)
Discussion started by: pandeesh
3 Replies

10. Shell Programming and Scripting

Simply question about capturing output to /dev/tty

Suppose another person wrote the following one-line shell script: echo $RANDOM > /dev/tty QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable? QUESTION #2: How can this be done in a cron job? Specific code, whether in ksh or... (1 Reply)
Discussion started by: Paul R
1 Replies
OPENPTY(3)						   BSD Library Functions Manual 						OPENPTY(3)

NAME
openpty, login_tty, forkpty -- tty utility functions SYNOPSIS
#include <util.h> int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp); int login_tty(int fd); pid_t forkpty(int *amaster, char *name, struct termios *termp, struct winsize *winp); DESCRIPTION
The openpty(), login_tty(), and forkpty() functions perform manipulations on ttys and pseudo-ttys. The openpty() function allocates a pseudo-tty and returns file descriptors for the master and slave in amaster and aslave. If name is non- null, the filename of the slave is returned in name. If termp is non-null, the terminal parameters of the slave will be set to the values in termp. If winp is non-null, the window size of the slave will be set to the values in winp. The login_tty() function prepares for a login on the tty fd (which may be a real tty device, or the slave of a pseudo-tty as returned by openpty()) by creating a new session, making fd the controlling terminal for the current process, setting fd to be the standard input, out- put, and error streams of the current process, and closing fd. The forkpty() function combines openpty(), fork(), and login_tty() to creates a new process operating in a pseudo-tty. The file descriptor of the master side of the pseudo-tty is returned in amaster, and the filename of the slave in name if it is non-null. The termp and winp parameters, if non-null, will determine the terminal attributes and window size of the slave side of the pseudo-tty. RETURN VALUES
If a call to openpty(), login_tty(), or forkpty() is not successful, -1 is returned and errno is set to indicate the error. Otherwise, openpty(), login_tty(), and the child process of forkpty() return 0, and the parent process of forkpty() returns the process ID of the child process. ERRORS
openpty() will fail if: [EAGAIN] There are no available pseudo-ttys. login_tty() will fail if ioctl() fails to set fd to the controlling terminal of the current process. forkpty() will fail if either openpty() or fork() fails. FILES
/dev/ptmx cloning pseudo-tty device /dev/ttys[0-9][0-9][0-9] slave pseudo-tty devices SEE ALSO
fork(2) BSD
April 5, 2008 BSD
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy