finished work with getting pid and ip into char*