python - put a pipe in a dictionary -


pmu_pipe_map = {}  pipe= 'tmp/%s.pipe' % hostname if not os.path.exists(pipe):     os.mkfifo(pipe)  pmu_pipe_map[hostname] = os.open(pipe, os.o_wronly) 

im trying open n pipes. in order keep track of them i'd store them somehow - in dictionary - thought above code should work freezes during execution. suggestions?

this work however:

pipein = os.open(pipe, os.o_wronly) 

aha! apparently there has read on other end before can return pipe. question asked not correct because failed test 2 scenarios in same way. problem in understanding how pipes work. in situation dictionary entry succeed once piping opened on 'read' end block until then. how determine if pipe can written


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -