Author Topic: SysV IPC  (Read 266 times)

LeoTh3o

  • Full Member
  • ***
  • Posts: 231
  • Reputation: 43
    • ET&C
  • Computers: MacBook Pro 15', half 2009, OS X 10.8.1
  • iDevices: iPod 3G iOS 5.1.1; iPad 2 WiFi iOS 5.1.1 jb
SysV IPC
« on: September 28, 2012, 03:35:08 am »
I have been trying recently to revive my project to port PostgreSQL to iOS.

Please note that there hasn't been problems in the building itself, just a great amount of bad system calls at runtime.

I did some search and found this:http://postgresql.1045698.n5.nabble.com/Postgresql-iPhone-td3958621.html
it would kind of surprise me if Apple had bothered to support
SysV IPC primitives in iOS.  You'd need to find replacements for our
sysv_shmem and sysv_sema modules.  It's possible that posix_sema would
work, although I'd bet against that too.


In fact, Apple has not implemented either, but has happily put headers such as sys/ipc.h and sys/shm.h in the SDK.

The sample test from http://www.ibm.com/developerworks/aix/library/au-ipc/ actually proves this:

My key is -1
Bad system call: 12


Sysctl also says so:
kern.sysv: No such file or directory


I'll be looking for a solution or an already existing implementation of SysV
« Last Edit: September 28, 2012, 12:44:09 pm by LeoTh3o »
0xEB        0xFE
jmp short -2

grinch

  • Administrator
  • Hero Member
  • *****
  • Posts: 1926
  • Reputation: 187
  • the digital grinch who stole your data
    • @DigitalGrinch
  • Badges:
  • iDevices: iPhone 3GS 4.3.3, HTC Evo V 4G ICS
Re: SysV IPC
« Reply #1 on: September 28, 2012, 09:05:38 am »
Keep up the good work sir! Having PostgreSQL on iOS would be HUGE

Sorry I can't help with this issue
If I help you or you appreciate my work, clicking that +1 button is the best thanks I could get.

My opinions are my own, you may agree or disagree with them, but they are only just that; opinions
For example: facebook is the microsoft of social networks

http://goo.gl/PiVjI

@DigitalGrinch
https://twitter.com/DigitalGrinch

I follow all iNinjas members back. PM me if I am not following you

LeoTh3o

  • Full Member
  • ***
  • Posts: 231
  • Reputation: 43
    • ET&C
  • Computers: MacBook Pro 15', half 2009, OS X 10.8.1
  • iDevices: iPod 3G iOS 5.1.1; iPad 2 WiFi iOS 5.1.1 jb
Re: SysV IPC
« Reply #2 on: September 28, 2012, 12:41:19 pm »
After a day surfing the net, I humbly admit defeat. There seem to be no implementation of sysv except the one from libffi for iOS. Due my scarce comprehension of assembly, I cannot say what is done there and wouldn't be able to replicate it, anyway.

I do lack specific knowledge of what actually sysv does and how can implemented in a system not providing it by default. To solve it in an elegant way there should be someone either experienced in system programming and/or someone able to disclose some of Apple's internal stuff. I don't happen to know any of this kind of person.

As a last attempt, I'll try to make configure NOT find headers for SysV and see what happens.

I'd be interested if any other member of ininjas can provide better insight of the problem and/or figured something more out.

As a last note, I think that APR rely on SysV, which would explain why it's not possible to build a working one.
0xEB        0xFE
jmp short -2

LankAsif

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2392
  • Reputation: 90
  • Forum pride 8)
  • Badges:
  • Computers: i7 with bits and pieces
  • iDevices: iPod Touch 1G (Basically storage for iNinja tools), iPhone 5
Re: SysV IPC
« Reply #3 on: September 28, 2012, 12:53:14 pm »
I am a lil off topic here, but just wanted to say that even though I know diddly about this kinda thing, your posts were a pleasure to read LeoTh3o. Thank you for taking the time to share your findings. It is a thread like this that inspires me to learn more.
I wish ya luck comrade ;)

Education is never achieved by wise men. it is only believed to have been achieved by fools