How to create named pipe (mkfifo) in Android?

后端 未结 5 1857
南方客
南方客 2020-12-13 07:35

I am having trouble in creating named pipe in Android and the example below illustrates my dilemma:

res = mkfifo(\"/sdcard/fifo9000\", S_IRWXO);
if (res != 0         


        
5条回答
  •  被撕碎了的回忆
    2020-12-13 08:10

    there's also /sqlite_stmt_journals (we use it for testing, I don't know how long this directory will survive OS updates)

    If you need IPC, the best practices are to use the Binders

    If you only need inter-thread communication, you can use unnamed pipes through JNI (this works fine)

提交回复
热议问题