Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e12739c2
Commit
e12739c2
authored
Mar 11, 2003
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Open with O_NONBLOCK to avoid hanging on open().
parent
10fc650e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Modules/ossaudiodev.c
Modules/ossaudiodev.c
+5
-1
No files found.
Modules/ossaudiodev.c
View file @
e12739c2
...
...
@@ -131,7 +131,11 @@ newossobject(PyObject *arg)
basedev
=
"/dev/dsp"
;
}
if
((
fd
=
open
(
basedev
,
imode
))
==
-
1
)
{
/* Open with O_NONBLOCK to avoid hanging on devices that only allow
one open at a time. This does *not* affect later I/O; OSS
provides a special ioctl() for non-blocking read/write, which is
exposed via oss_nonblock() below. */
if
((
fd
=
open
(
basedev
,
imode
|
O_NONBLOCK
))
==
-
1
)
{
PyErr_SetFromErrnoWithFilename
(
PyExc_IOError
,
basedev
);
return
NULL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment