HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "open failed: No such file or directory"
Operating System - HP-UX
1832910
Members
2734
Online
110048
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 07:15 AM
04-30-2003 07:15 AM
"open failed: No such file or directory"
main(){
char buf[1024];
int fd, count;
if ((fd = open("/dev/ttya", O_RDWR)) < 0) {
perror("open failed");
exit(1);
}
when i try to run the above code i am getting the following error
"open failed: No such file or directory"
can i anybody help why open system call has failed
char buf[1024];
int fd, count;
if ((fd = open("/dev/ttya", O_RDWR)) < 0) {
perror("open failed");
exit(1);
}
when i try to run the above code i am getting the following error
"open failed: No such file or directory"
can i anybody help why open system call has failed
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 07:22 AM
04-30-2003 07:22 AM
Re: "open failed: No such file or directory"
The most obvious answer is that /dev/ttya does not exist.
I really prefer to capture errno myself after a system call failure and display that value. It is also possible that ttya exists but has very screwy major/minor device numbers. Do an ls -l /dev/ttya and post that and we can probably get closer to the problem.
I really prefer to capture errno myself after a system call failure and display that value. It is also possible that ttya exists but has very screwy major/minor device numbers. Do an ls -l /dev/ttya and post that and we can probably get closer to the problem.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 07:22 AM
04-30-2003 07:22 AM
Re: "open failed: No such file or directory"
The most obvious answer is that /dev/ttya does not exist.
I really prefer to capture errno myself after a system call failure and display that value. It is also possible that ttya exists but has very screwy major/minor device numbers. Do an ls -l /dev/ttya and post that and we can probably get closer to the problem.
I really prefer to capture errno myself after a system call failure and display that value. It is also possible that ttya exists but has very screwy major/minor device numbers. Do an ls -l /dev/ttya and post that and we can probably get closer to the problem.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 09:19 AM
04-30-2003 09:19 AM
Re: "open failed: No such file or directory"
Or perhaps do:
ls /dev/tty*
and see what tty devices are actually defined on your system.
ls /dev/tty*
and see what tty devices are actually defined on your system.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP